Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- *** CODE 1 ***
- */
- public class Main {
- public Main();
- Code:
- 0: aload_0
- 1: invokespecial #8 // Method java/lang/Object."<init>":
- ()V
- 4: return
- public static void main(java.lang.String[]);
- Code:
- // Here is where we created "i" and allocated the List
- (I)Ljava/lang/Integer;
- 40: aastore
- 41: astore_2
- 42: aload_2
- 43: dup
- 44: astore 6
- 46: arraylength
- 47: istore 5
- 49: iconst_0
- 50: istore 4
- 52: goto 71
- 55: aload 6
- 57: iload 4
- 59: aaload
- 60: astore_3
- 61: iload_1
- 62: aload_3
- 63: invokevirtual #22 // Method java/lang/Integer.intValue
- :()I
- 66: iadd
- 67: istore_1
- 68: iinc 4, 1
- 71: iload 4
- 73: iload 5
- 75: if_icmplt 55
- 78: getstatic #26 // Field java/lang/System.out:Ljava/
- io/PrintStream;
- 81: iload_1
- 82: invokevirtual #32 // Method java/io/PrintStream.printl
- n:(I)V
- 85: return
- }
- /*
- *** CODE 2 ***
- */
- public class Main {
- public Main();
- Code:
- 0: aload_0
- 1: invokespecial #8 // Method java/lang/Object."<init>":
- ()V
- 4: return
- public static void main(java.lang.String[]);
- Code:
- // Here is where we created "i" and allocated the List
- erator:()Ljava/util/Iterator;
- 71: astore 4
- 73: goto 94
- 76: aload 4
- 78: invokeinterface #35, 1 // InterfaceMethod java/util/Iterato
- r.next:()Ljava/lang/Object;
- 83: checkcast #20 // class java/lang/Integer
- 86: astore_3
- 87: iload_1
- 88: aload_3
- 89: invokevirtual #41 // Method java/lang/Integer.intValue
- :()I
- 92: iadd
- 93: istore_1
- 94: aload 4
- 96: invokeinterface #45, 1 // InterfaceMethod java/util/Iterato
- r.hasNext:()Z
- 101: ifne 76
- 104: getstatic #49 // Field java/lang/System.out:Ljava/
- io/PrintStream;
- 107: iload_1
- 108: invokevirtual #55 // Method java/io/PrintStream.printl
- n:(I)V
- 111: return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement