Created
July 1, 2016 17:33
-
-
Save leonardosnt/6d1c79822aab899c57916efbc9bcefe7 to your computer and use it in GitHub Desktop.
This file contains 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
int i = 23; | |
String str = Integer.toString(i); | |
Compilado para | |
ILOAD 1 | |
INVOKESTATIC java/lang/Integer.toString (I)Ljava/lang/String; | |
ASTORE 2 | |
int i = 23; | |
String str = i + ""; | |
Compilado para | |
NEW java/lang/StringBuilder | |
DUP | |
INVOKESPECIAL java/lang/StringBuilder.<init> ()V | |
ILOAD 1 | |
INVOKEVIRTUAL java/lang/StringBuilder.append (I)Ljava/lang/StringBuilder; | |
LDC "" | |
INVOKEVIRTUAL java/lang/StringBuilder.append (Ljava/lang/String;)Ljava/lang/StringBuilder; | |
INVOKEVIRTUAL java/lang/StringBuilder.toString ()Ljava/lang/String; | |
ASTORE 2 | |
Diferença né? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment