1. IS-A relationship is also known as ‘Inheritance‘.
  2. By using extends keyword we can implement inheritance.
  3. The main advantage is re-usability.What ever parent has by default available to the child.i.e without rewriting, child class is allowed to use parent class functionality.


class Parent{
	public void m1(){
		System.out.println("Parent:m1() method");

class Child extends Parent{
	public void m2(){
		System.out.println("Child:m2() method");
public class Test {

	public static void main(String[] args) {
		 Parent p1=new Parent();
		 Child c=new Child();
		 Parent p2=new Child();

Note: Parent class reference can be used to hold Child class object,but by using that reference we are not allowed to call Child class specific methods otherwise we will get compile time error.