And might I add for other helpless souls. After everything is done and when creating AddressImpl object reference to hold the getAddress() return type. Dont forget to cast it. So as to tell the compiler you know what you are doing.
AddressImpl myAdd = (AddressImpl) P1.getAddress(); Or else it gives a compile error - saying incompatible types. Thanks. -- To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en