2017年9月18日

string、stringbuffer与stringbulder区别

摘要: 1、 字符串是一个特殊的对象,它一旦被初始化,就不可以被改变,不能有子类,所以String中的方法都不能被复写; 2、 字符串有两种赋值方式 1) String s1 = “abc”; ——在内存中只有一个对对象。 2) String s2 = new String(“abc”);——在内存中有两个 阅读全文

posted @ 2017-09-18 16:06 北方阿木 阅读(2194) 评论(0) 推荐(0)

导航