hi all,
watch out the following code
----------------------------
class A
{String s = "AB";}
class B{ A a = new A();}
class C extends B
{
public static void main(
String [] args)
{
C c = new C();
c.print();
}
void print()
{
System.out.println(a.s);//First
System.out.println(a.s);//IInd
}
}
}
-------------------------------
which one of the above is the simplest way to print s on the screen
Thanking in advance