47 Program to perform Abstract Class in Java

Code:

abstract class AbstractClass
{
abstract void display();
}

class Demo extends AbstractClass
{
void display()
{
System.out.println(" Abstract Class Method");
}

public static void main( String  args[] )
{
Demo d = new Demo();
d.display();
}
}


Output:


Previous
Next Post »