Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Java Source:
- public class Test {
- public static void main(String[] args)
- {
- int x; // declare x
- int y=4; // declare and assign y
- y++; // change y
- String s; // declare s
- //
- x=28;
- s="Hello world!";
- }
- }
- Byte Code:
- $ javap -c -l Test.class
- Compiled from "Test.java"
- public class Test {
- public Test();
- Code:
- 0: aload_0
- 1: invokespecial #1 // Method java/lang/Object."<init>":()V
- 4: return
- LineNumberTable:
- line 1: 0
- LocalVariableTable:
- Start Length Slot Name Signature
- 0 5 0 this LTest;
- public static void main(java.lang.String[]);
- Code:
- 0: iconst_4
- 1: istore_2
- 2: iinc 2, 1
- 5: bipush 28
- 7: istore_1
- 8: ldc #2 // String Hello world!
- 10: astore_3
- 11: return
- LineNumberTable:
- line 5: 0
- line 6: 2
- line 9: 5
- line 10: 8
- line 11: 11
- LocalVariableTable:
- Start Length Slot Name Signature
- 0 12 0 args [Ljava/lang/String;
- 8 4 1 x I
- 2 10 2 y I
- 11 1 3 s Ljava/lang/String;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement