String类的概述和使用
(1)由多个字符组成的一串数据。
(2)构造方法:
A:String s = new String();
B:String s = new String(byte[] bys);
C:String s = new String(byte[] bys,int startIndex,int count);
D:String s = new String(char[] chs);
E:String s = new String(char[] chs,int startIndex,int count);
F:String s = new String(String s2);
G:String s = "hello"; |
|