String s = “Hello”;
String s2 = “Hello”;
if (s==s2){
System.out.println(“Equal without new operator”);
}
String t = new String(“Hello”);
string u = new String(“Hello”);
if (t==u){
System.out.println(“Equal with new operator”);
}
qual diferenca entre esta declaracao String s2 = “Hello”;
e esta String u = new String(“Hello”);