userimage

How to compare two string in Java?

How to compare two string in Java?
userimage

to compare two sting the best way will be 


String s = "test";

String s1 = "test";


s.equals(s1);


will return the right result as true or false.

Answer is