class Super
{
static int x = 5;
static void main(
String args[])
{
System.out.println("This is Super class : "+x);
}
}
class Sub extends Super
{
static void main(String args[])
{
System.out.println("This is Sub class : "+x);
}
}
The code azaman posted last day,when I
test,I got the answer:
java Super
This is Super class : 5
java Sub
This is Sub class : 5
But David said it should be 0 in Sub class,not 5...
??? what's the problem ??
---------
Liao