A Simple Java program related to inheritance:-
class aaa
{
}
class bbb
{
}
class ccc
{
public static void main(String mm[])
{
aaa a;
a=new bbb(); // Incorrect not compiled because both aaa
bbb b; // and bbb don't have relation ship between
b=new aaa(); // each other.
}
}
continue with - part 2
-------------------------------------------------------------------------
class aaa
{
}
class bbb
{
}
class ccc
{
public static void main(String mm[])
{
aaa a;
a=new bbb(); // Incorrect not compiled because both aaa
bbb b; // and bbb don't have relation ship between
b=new aaa(); // each other.
}
}
continue with - part 2
-------------------------------------------------------------------------
No comments:
Post a Comment