Your problem is your confusion between the
variables and the
inheritance/classes. The statement
private Name fName; in
class Contact is a backward reference. if
fName is the same for both classes you won't need to declare it in your class Name but define
fName as
protected (only for inheritance) or
public (also from outside) in the "mother"
class Contact. Your code won't make any sense and is logically wrong. It's also not a recursive technique.
public class Contact{
prrotected String fName; // or public String fName;
//wrong: private Name fName;
..