static {};方法表——类构造器(或静态代码块)
flags: ACC_STATIC
Code:
stack=3, locals=0, args_size=0
0: bipush 123
2: putstatic #8 // Field statical_sId:I
5: getstatic #3 // Field java/lang/System.out:Ljava/io/PrintStream;
8: new #4 // class java/lang/StringBuilder
11: dup
12: invokespecial #5 // Method java/lang/StringBuilder."<init>":()V
15: ldc #6 // String statical_sId =
17: invokevirtual #7 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/
lang/StringBuilder;
20: getstatic #8 // Field statical_sId:I
23: invokevirtual #9 // Method java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilde
r;
26: invokevirtual #10 // Method java/lang/StringBuilder.toString:()Ljava/lang/String;
29: invokevirtual #11 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
32: getstatic #3 // Field java/lang/System.out:Ljava/io/PrintStream;
35: ldc #14 // String Son类构造器<clinit>执行!
37: invokevirtual #11 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
40: return
LineNumberTable:
line 6: 0
line 11: 5
line 12: 32
line 13: 40
}
3.总结