string内存分析

String s = "abc"; String s1 = "abc"; System.out.println(s== s1);//true:abc可以共享 System.out.println(s.equals(s1));//true String s2 = new String("abc");//在堆内存开辟空间 String s3 = new String("abc");     Syste
相关文章
相关标签/搜索