Created
May 5, 2017 08:30
-
-
Save codehz/d6500de59c347aaac58c3e78cc1de2be 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
public class HelloWorld | |
{ | |
public HelloWorld() {} | |
public static void main(String[] paramArrayOfString) | |
{ | |
System.out.println(concat("233", 100)); | |
} | |
public static String concat(String paramString, int paramInt) { | |
String str = ""; | |
for (int i = 0; i < paramInt; i++) str = str + paramString; | |
return str; | |
} | |
} |
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 static java.lang.String concat(java.lang.String, int); | |
descriptor: (Ljava/lang/String;I)Ljava/lang/String; | |
flags: ACC_PUBLIC, ACC_STATIC | |
Code: | |
stack=2, locals=4, args_size=2 | |
0: ldc #6 // String | |
2: astore_2 | |
3: iconst_0 | |
4: istore_3 | |
5: iload_3 | |
6: iload_1 | |
7: if_icmpge 35 | |
10: new #7 // class java/lang/StringBuilder | |
13: dup | |
14: invokespecial #8 // Method java/lang/StringBuilder."<init>":()V | |
17: aload_2 | |
18: invokevirtual #9 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
21: aload_0 | |
22: invokevirtual #9 // Method java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
25: invokevirtual #10 // Method java/lang/StringBuilder.toString:()Ljava/lang/String; | |
28: astore_2 | |
29: iinc 3, 1 | |
32: goto 5 | |
35: aload_2 | |
36: areturn | |
LineNumberTable: | |
line 24: 0 | |
line 25: 3 | |
line 26: 35 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment