class A
{
void show()
{
System.out.println("Super class");
}
}
class B extends A
{
void display()
{
System.out.println("Subclass");
}
}
class Inheritdemo
{
public static void main(String args[])
{
B b= new B();
b.show();
b.display();
}
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment