class b extends a

class A
{
void showA()
{
System.out.println("class showA");
}
}

class B extends A
{
void showB()
{
System.out.println("class showB");
}
}

class show
{
public static void main(String args[])
{
A a=new A();
B b=new B();
a.showA();
b.showB();
// a.showB();
b.showA();
}
}

No comments:

Post a Comment

Template Design by faris vio