If you are extending any abstract class that have abstract method, you must either provide the implementation of the method or make this class abstract.

Java Programming Language / Polymorphism in Java

1016

Program:

abstract class Parent{
  abstract void age();
}
abstract class Child extends Parent{
abstract void age();
	}

class Child1 extends Child{
	void age(){
			System.out.println("age 22");
		}
		public static void main(String args[]){
		 Parent obj = new Child1();
		 obj.age();
	}
}

Output:

age 22
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.