Answers for "Java Compare two strings if they are equal"

1

Java Compare two strings if they are equal

String myStr1 = "Hello";
String myStr2 = "Hello";
String myStr3 = "Another String";
System.out.println(myStr1.equals(myStr2)); // Returns true because they are equal
System.out.println(myStr1.equals(myStr3)); // false
Posted by: Guest on September-04-2021

Code answers related to "Java Compare two strings if they are equal"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language