I found out that the parent class is the base class and that the child class is derived from it and there is also the ancestor class and decendent, but I do not understand what it all means.
1.Inheritence is designed to support reusability. 2.To support the polymorphism 3.subclass can access superclass propeties vice versa not pssible. [ it is like you can access your father properties,but your father can not access yours properties]
Originally posted by seetharaman venkatasamy 3.subclass can access superclass propeties vice versa not pssible. [ it is like you can access your father properties,but your father can not access yours properties]
Did you mean that using super class reference you cannot access child class specific members Nothing stops from accessing the inherited members.
I know you will all complain I am being pedantic, but they are not called "child" and "parent." They are called "subclass" and "superclass."
"Parent" and "child" are used in Java for GUI components; if you have something inside something else, the "something" is called a "child" and the "something else" is called its "parent" and something outside that can be called an "ancestor."
Other languages might have different names, but that (as far as I can remember) is what they are called in Java.