hai
this question is from Dan Chisholm's mock exam
class A {
A() {System.out.print("CA ");}
static {System.out.print("SA ");}
}
class B extends A {
B() {System.out.print("CB ");}
static {System.out.print("SB ");}
public static void main (
String[] args) {
B b = new B();
}}
Answer is, it prints SA SB CA CB
I got the same when I compile and run the code.
can any one explain me,why the output is not SA CA SB CB
Thanks in advance
Haripriya