Created
December 7, 2018 10:55
-
-
Save novemio/a076f646b5cf5ac54165f2bcbead0fe1 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 static void main(String[] args){ | |
String s1= "abc"; | |
String s2= new String("abc"); | |
String s3 = "abc"; | |
System.out.println(s1==s2); | |
System.out.println(s1.equals(s2)); | |
System.out.println(s1==s3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment