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
相關文章
相關標籤/搜索