Inheritance means one class can extend to another class. So that the codes can be reused from one class to another class. The existing class is known as the Super class whereas the derived class is known as a sub class.

Example:

Super class:
public class Manupulation(){
}
Sub class:
public class Addition extendsManipulation(){
}

Inheritance is only applicable to the public and protected members only. Private members can’t be inherited.