码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2014-11-14 11:59:28      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:style   color   ar   sp   java   div   on   问题   bs   

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.

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

标签:style   color   ar   sp   java   div   on   问题   bs   

原文地址:http://www.cnblogs.com/cuinidaye/p/4096671.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!