Inheritance: Look at the image below you will get a point, Yes, the derived class can access base class properties and still the derived class has its own properties.
Inheritance
Class
Extends - IS A RELATIONSHIP
Interface
Implements - HAS A RELATIONSHIP
![](https://docs.oracle.com/javase/tutorial/figures/java/concepts-bikeHierarchy.gif)
Types of Inheritance,
Note :
Multiple inheritance is not supported in JAVA,because of method ambiguous
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhoAhkX2svNX6P2JlulqiCh8WmOPP4ddNw9aV_j6BpZpIihv2LVqZImGhoJMOZ0LG8xXXMj0cUEZyeS3lE8JmJA1tVgZskSsnh70RuA4snrU76-6VaTWZiX94YVoaQnPou0NqyS1DSLdmA/s1600/inheritance.jpg)
Interface
No comments:
Post a Comment