java中String對象的存儲位置

原文:http://www.cnblogs.com/carsonwuu/p/9752949.html html String s1= new String("helloworld");     //這個「helloworld」常量,首先被存入了常量池中;new出來的String對象,存放在堆中java String s1= "hellowworld";  //這個s1只是對常量池中的「hellow
相關文章
相關標籤/搜索