Created
November 23, 2022 17:29
-
-
Save puzpuzpuz/104edaf8ba1a875a6f1823a790d545e0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// class version 55.0 (55) | |
// access flags 0x21 | |
public class Main { | |
// compiled from: Main.java | |
// access flags 0x1 | |
public <init>()V | |
L0 | |
LINENUMBER 1 L0 | |
ALOAD 0 | |
INVOKESPECIAL java/lang/Object.<init> ()V | |
RETURN | |
L1 | |
LOCALVARIABLE this LMain; L0 L1 0 | |
MAXSTACK = 1 | |
MAXLOCALS = 1 | |
// access flags 0x9 | |
public static main([Ljava/lang/String;)V | |
L0 | |
LINENUMBER 4 L0 | |
ICONST_3 | |
NEWARRAY T_INT | |
DUP | |
ICONST_0 | |
ICONST_1 | |
IASTORE | |
DUP | |
ICONST_1 | |
ICONST_2 | |
IASTORE | |
DUP | |
ICONST_2 | |
ICONST_3 | |
IASTORE | |
ASTORE 1 | |
L1 | |
LINENUMBER 6 L1 | |
ICONST_0 | |
ISTORE 2 | |
L2 | |
ALOAD 1 | |
ARRAYLENGTH | |
ISTORE 3 | |
L3 | |
FRAME APPEND [[I I I] | |
ILOAD 2 | |
ILOAD 3 | |
IF_ICMPGE L4 | |
L5 | |
LINENUMBER 7 L5 | |
GETSTATIC java/lang/System.out : Ljava/io/PrintStream; | |
ALOAD 1 | |
ILOAD 2 | |
IALOAD | |
INVOKEVIRTUAL java/io/PrintStream.println (I)V | |
L6 | |
LINENUMBER 6 L6 | |
IINC 2 1 | |
GOTO L3 | |
L4 | |
LINENUMBER 10 L4 | |
FRAME CHOP 2 | |
ALOAD 1 | |
ASTORE 2 | |
ALOAD 2 | |
ARRAYLENGTH | |
ISTORE 3 | |
ICONST_0 | |
ISTORE 4 | |
L7 | |
FRAME APPEND [[I I I] | |
ILOAD 4 | |
ILOAD 3 | |
IF_ICMPGE L8 | |
ALOAD 2 | |
ILOAD 4 | |
IALOAD | |
ISTORE 5 | |
L9 | |
LINENUMBER 11 L9 | |
GETSTATIC java/lang/System.out : Ljava/io/PrintStream; | |
ILOAD 5 | |
INVOKEVIRTUAL java/io/PrintStream.println (I)V | |
L10 | |
LINENUMBER 10 L10 | |
IINC 4 1 | |
GOTO L7 | |
L8 | |
LINENUMBER 13 L8 | |
FRAME CHOP 3 | |
RETURN | |
L11 | |
LOCALVARIABLE i I L2 L4 2 | |
LOCALVARIABLE n I L3 L4 3 | |
LOCALVARIABLE n I L9 L10 5 | |
LOCALVARIABLE args [Ljava/lang/String; L0 L11 0 | |
LOCALVARIABLE arr [I L1 L11 1 | |
MAXSTACK = 4 | |
MAXLOCALS = 6 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
int[] arr = new int[]{1, 2, 3}; | |
for (int i = 0, n = arr.length; i < n; i++) { | |
System.out.println(arr[i]); | |
} | |
for (int n : arr) { | |
System.out.println(n); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment