0
How to compare 2 strings in an if statement?
How to compare two strings to test to see if user typed the correct string
4 Réponses
+ 5
Try this :
if (String1.equals(String2)) {
System.out.println("They match");
else {System.out.println("They not match");}
+ 1
Thanks!
0
if "string1"=="string2":
Try this. My experienced with java is limited, but I think this should work.
- 1
I think this works
If " string2 " =="string1"
And ....