Created
May 3, 2025 09:28
-
-
Save nkchauhan003/1d2ed98296af63a36463bef67684c023 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 CompareTest { | |
public static void main(String[] args) { | |
String x = new String("Java"); | |
String y = new String("Java"); | |
System.out.println(x.equals(y)); // true: same content | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment