字符串的比较
String s1,s2;
s1="how are you";
s2="how are you";
String tom1=new String ("we are students");
String tom2=new String ("we are students");
请问大家:
s1==s2的值是false还是true?为什么?
tom1==tom2的值是false还是true?为什么?
String s1,s2;
s1="how are you";
s2="how are you";
String tom1=new String ("we are students");
String tom2=new String ("we are students");
请问大家:
s1==s2的值是false还是true?为什么?
tom1==tom2的值是false还是true?为什么?