String s="hi"; String s1=new String("hi");
从内存的角度来看,s和s1存储在哪里?无论是在堆内存还是堆栈中。
s 指向“hi”,s1 指向 hi 所在的内存位置?
请帮忙?
java string
java ×1
string ×1