62,615
社区成员
发帖
与我相关
我的任务
分享
public class TestToString {
public static void main(String[] args) {
String s1 = "hello";
String s2 = "hello";//String s2 = new String("hello");改成这样的话,它又是false了。 System.out.println(s1 == s2);//那我觉得这应该是false呀??为什么它是true????
}
}