public class Test_String_equals {
public static void main(String[] args) {
String a1 = new String("hello world!");
String a2 = new String("hello world!");
System.out.println("a1==a2:"+a1==a2);false
System.out.println("a1.equals(a2): "+a1.equals(a2)); //true
}
}