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

String新用

2015-07-15 00:00 330 查看
摘要: 越是简单的东西越不容易完全明白,越是需要耐心去搞懂它。

public class TestString {
public static void main(String[] args){
char data[] = {'a', 'b', 'c'};
String str = new String(data);//Constructs a new String by decoding the specified
array of bytes using the platform's default charset.用一个字节数组和字符集来生成spring类
System.out.println("aa:"+str);
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息