However this will be true.



String s1 = "string";
String s2 = "string";

if (s1 == s2) {
// This is true
}