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...