Inheritance in Java
Inheritance is the process of obtaining base class properties into derived class. Inheritance in java is mainly used for achieve concept of re-usability. Java doesn't support multiple inheritance but in java you can achieve multiple inheritance by using interface concept.Java support following types of inheritance;
- Single Inheritance
- Multi level Inheritance
- Hybrid Inheritance
- Hierarchical Inheritance
Java doesn't support multiple inheritance due to ambiguity problem
No comments:
Post a Comment