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
Published on 02-Feb-2018 08:22:09
Advertisements