java char数组转化为 String

1.构造String时建立:如 char data[] = {'s', 'g', 'k'}; String str = new String(data);

2.调用String类方法 String.valueOf(char[] chr),如 char[] cha = {'s','g','h'}; String n = String.valueOf(cha);

 

posted @ 2014-04-04 00:17  Rickshao  阅读(1247)  评论(0编辑  收藏  举报