Search This Blog

15 June, 2011

Simple Java program related to inheritance - part 1

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
-------------------------------------------------------------------------

No comments:

Post a Comment

Meetme@