extends Keyword : extends keyword in Java is used to implement inheritance. We will be using extends keyword in Java program to implement inheritance. For example : class B extends A, here extends keyword is used to create a child class of class A. |
Note-1 : Multiple inheritance is not supported in Java. Multiple inheritance in OOP is a type of inheritance in which once child class inherits from more than one parent class. Note-2 : In Java Multiple inheritance is not supported because it may become ambiguous in case if more than one parent class have same type of method. |
For example : Suppose class B derive properties and behavior of class A, then class B is called child class/sub class and class A is called parent class/super class.