1.测(每题1分,试试你能得几分?)
(1) "" VS new
String s1 = "Hello String Question-1";
String s2 = new String("Hello String Question-1");
System.out.println(s1 == s2);
(2)"" VS ""+new
String s1 = "Hello String Question-2";
String s2 = "Hello " + new String("String Question-2");
System.out.println(s1 == s2);
(3)"" VS new+new
String s1 = "Hello String Question-3";
String s2 = new String("Hello ") + new String("String Question-3");
System.out.println(s1 == s2);
(4)"" VS ""+""
String s1 = "Hello String Question-4"