I got this question form JQPlus:
public class Tester {
static
String s1 = sM1("a");
{ s1 = sM1("b"); }
static {
s1 = sM1("C");
}
public static void main( String args[] ) {
Tester it = new Tester();
}
private static String sM1( string s ) {
System.out.println(s);
return s;
}
}
The answer is that 'a','c','b'will be printed in that order. However, I could not compite the program when I tried to
test it myself. My attempt to fix the program failed. how should it be fixed?