class A
{
void show()
{
System.out.println("\n it is of a class");
}
}
class B extends A
{
void show()
{
super.show();
System.out.println("\n it is of B class");
}
}
class C extends B
{
void show()
{
super.show();
System.out.println("\n it is of C class");
}
}
class over
{
public static void main(String args[])
{
C c=new C();
c.show();
}
}
{
void show()
{
System.out.println("\n it is of a class");
}
}
class B extends A
{
void show()
{
super.show();
System.out.println("\n it is of B class");
}
}
class C extends B
{
void show()
{
super.show();
System.out.println("\n it is of C class");
}
}
class over
{
public static void main(String args[])
{
C c=new C();
c.show();
}
}
No comments:
Post a Comment