class A {
static String a;
{print("a");}
static {a = print("A");}
A() {}
static String print(String s) {
System.out.print(s + " ");
return s;
}
}
class B extends A {
static String b;
{print("b");}
static {b = print("B");}
B() {}
}
class Test {
public static void main(String... args) {
System.out.print(B.a);
}
}
Login in to like
Login in to comment