abstract class Abs { abstract void display(); } class B extends Abs { void display() { System.out.println("Hello"); } } public class A { public static void main(String args[]) { B objB = new B(); objB.display(); } }
In the above program, the display() function in class B completes the display()
function in abstract class A.
Responses
0 Respones to "JAVA program to demonstrate Abstract class example"
Post a Comment