2021年09月15日 阅读数:1
Created by Wang, Jerry on Oct 23, 2016

stack=4, locals=1, args_size=1
Values in bytecode are stored in local variable slots and on the operand stack. Each can have up to 2^16 - 1 slots, but for efficiency reasons, you are required to specify a limit on the stack and locals so that it won’t waste all that space if you aren’t actually using it.
In compiled code, the compiler will automatically calculate this as the minimum that’s actually used in the function. In this case, it is using 4 slots in the operand stack and 1 slot in the local variable table. I am not sure what arg_size is, but I am guessing this is just the total size of parameters (i.e. the number of arguments). At any rate, this doesn’t correspond to any feature of the classfile format, so whatever it is, javap is calculating and inserting it manually.
LineNumberTable: section
The LineNumberTable is one of the optional attributes that holds metadata for debugging purposes. In this case, it specifies which offsets in the bytecode correspond to each line in the original source code. This is useful for printing more informative stack traces and for providing features like single step in the debugger.
Useful list:
#1: NullableTest
#43 = #14.#15