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.

posted on 2014-11-14 10:43  崔你大爷  阅读(266)  评论(0编辑  收藏  举报