If a class has at least one abstract method, then the class must be declared abstract.

Java Programming Language / Polymorphism in Java

3160

Program:

 abstract class Human{
  abstract void mother();
}
class Woman extends Human{
	void mother(){
		System.out.println("I am Your Mother");
		}
	public static void main(String args[]){
	 Human obj = new Woman();
	 obj.mother();
	}
}

  

Output:

I am Your Mother
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.