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
相关文章
相关标签/搜索