Understanding javap's output for the Constant Pool

后端 未结 3 1328
灰色年华
灰色年华 2020-12-12 15:58

When running javap on a very simple HelloWorld application I have some confusion on the output around the constant pool.

Test Code

p         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-12 16:13

    Pool entry #22 is a java.lang.String object. Entry #23 is the array of characters used to construct that String.

    The Java VM Spec is the "missing manual" for javap.

提交回复
热议问题