Types of inheritance in Java

JavaJava Programming Java 8

Java supports three types of inheritance −

  • Single Level inheritance - A class inherits properties from a single class. For example, Class B inherits Class A.
  • Multilevel inheritance - A class inherits properties from a class which again has inherits properties
  • Hierarchical inheritance - Multiple classes inherits properties from a single class. For example, Class B inherits Class A and Class C inherits Class A.




raja
Updated on 17-Jun-2020 06:51:15

Advertisements