javap -v main.class
{
public static void main(String[] args) {
int a=10;
int b=10;
int c=a+b;
return;
}
}
Classfile /F:/myCode/java/jvm/0710_demo01/untitled/target/classes/org/example/main.class
Last modified 2023年7月10日; size 447 bytes
MD5 checksum 675a0d673d66326ba82ea00f9de64972
Compiled from "Main.java"
public class org.example.Main
minor version: 0
major version: 55
flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: #2 // org/example/Main
super_class: #3 // java/lang/Object
interfaces: 0, fields: 0, methods: 2, attributes: 1
Constant pool:
#1 = Methodref #3.#21 // java/lang/Object."<init>":()V
#2 = Class #22 // org/example/Main
#3 = Class #23 // java/lang/Object
#4 = Utf8 <init>
#5 = Utf8 ()V
#6 = Utf8 Code
#7 = Utf8 LineNumberTable
#8 = Utf8 LocalVariableTable
#9 = Utf8 this
#10 = Utf8 Lorg/example/Main;
#11 = Utf8 main
#12 = Utf8 ([Ljava/lang/String;)V
#13 = Utf8 args
#14 = Utf8 [Ljava/lang/String;
#15 = Utf8 a
#16 = Utf8 I
#17 = Utf8 b
#18 = Utf8 c
#19 = Utf8 SourceFile
#20 = Utf8 Main.java
#21 = NameAndType #4:#5 // "<init>":()V
#22 = Utf8 org/example/Main
#23 = Utf8 java/lang/Object
{
public org.example.Main();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
line 5: 0
line 6: 3
line 7: 6
line 8: 10
LocalVariableTable:
Start Length Slot Name Signature
0 11 0 args [Ljava/lang/String;
3 8 1 a I
6 5 2 b I
10 1 3 c I
}
SourceFile: "Main.java"