Created
December 21, 2016 17:14
-
-
Save agustarc/cc89e6f0174129ae4a30fe1af7222b25 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
public class StringMemory { | |
public static void main(String... args) { | |
String literal = "loper"; | |
String object = new String("loper"); | |
System.out.println(literal == object); | |
System.out.println(literal.equals(object)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment