пятница, 18 января 2008 г.

Static method overridding

What will the following code print?


class SuperClass {
public static void test() {
System.out.println(0);
}

public static void main(String[] args) {
SuperClass test = new SubClass();
test.test();
}
}

class SubClass extends SuperClass {
public static void test() {
System.out.println(1);
}
}