java_函数手册_String_1.9_copyValueOf_字符数组生成字符串

 1 package calssString;
 2 
 3 public class copyValueOf___1_9 {
 4     public static void main(String[] args) {
 5         char[] strCom = {'I',' ','L','I','K','E',',','J','A','V','A'};
 6         String str = String.copyValueOf(strCom);
 7         System.out.println(str);
 8 
 9         strCom = new char[]{'我', '爱', '你'};
10         str = String.copyValueOf(strCom);
11         System.out.println(str);
12     }
13 }

 

posted @ 2018-03-28 19:43  alm  阅读(613)  评论(0编辑  收藏  举报