2
源代碼LocalVariableTable面積:如何理解javap的輸出
public class Example {
public int plus(int a){
int b = 1;
return a + b;
}
}
前一個文件的類的Deassemble結果:
public int plus(int);
Code:
Stack=2, Locals=3, Args_size=2
0: iconst_1
1: istore_2
2: iload_1
3: iload_2
4: iadd
5: ireturn
LineNumberTable:
line 5: 0
line 6: 2
LocalVariableTable:
Start Length Slot Name Signature
0 6 0 this LExample;
0 6 1 a I
2 4 2 b I
我的問題是如何理解下面的區域,什麼是Length
, Slot
的意思是:
LocalVariableTable:
Start Length Slot Name Signature
0 6 0 this LExample;
0 6 1 a I
2 4 2 b I