Java String
String s;//创建一个引用变量
String s="abc";//创建一个字符对象"abc"和一个引用变量s
String s=new String("abc");//创建两个字符对象,和两个引用变量
equal
String s=new String(); s="abc";//先创建一个空间对象,而后又用引用指向"abc"这个字符对象.
java 术语:constant pool 字符串池
Make progress is the topic for ever...
It's a fans of computer/ Computer is my favorite/ Making progress is the topic for ever...
0 Comments:
Post a Comment
<< Home