Skip to content

Instantly share code, notes, and snippets.

@nkchauhan003
Created May 3, 2025 09:28
Show Gist options
  • Save nkchauhan003/1d2ed98296af63a36463bef67684c023 to your computer and use it in GitHub Desktop.
Save nkchauhan003/1d2ed98296af63a36463bef67684c023 to your computer and use it in GitHub Desktop.
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