- Inheritance is known as getting property of one class to another.
- in java we can achieve inheritance using the keyword extends.
- inheritance has 3 types 1-single inheritance 2-multiple inheritance and 3-circular inheritance.
- no programming language support circular inheritance.
- Java also doesn't support multiple inheritance.
- super class object will be created first before the subclass object.
- super class constructor will get called through the subclass constructor.
- super class object is available through subclass reference variables.
- Object class is the super class of all the classes and the object of the Object class will be created first before creation of any other classes.
- we have reference from subclass to superclass and we don't have reference from super classess to sub classess
فریبا
یکشنبه 15 مردادماه سال 1391 ساعت 02:33 ب.ظ