您的位置:首页 > 编程语言 > Java开发

【Java】String str = new String("abc");问题

2014-11-14 10:43 525 查看
String str = new String("abc");

构造方法说明:java.lang.String.String(String original)

解释:Initializes a newly created
String
object so that it represents
the same sequence of characters as the argument; in other words, the newly
created string is a copy of the argument string. Unless an explicit copy of
original
is needed, use of this constructor is unnecessary since
Strings are immutable.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐