//Demo of Abstract Class and Methods
abstract class A
{
abstract void show();
void display()
{
System.out.println("This is display() method of Abstract class A...");
}
}
class B extends A
{
void show()
{
System.out.println("This is Overridden Method show() of class A in class B...");
}
}
class AbstractDemo
{
public static void main(String aa[])
{
B b=new B();
b.show();
b.display();
}
}
Output |
No comments:
Post a Comment