Char型数组-------->String
// 朱茂强 QQ:896228072(望大牛指点)
public static void main(String[] args) {
// TODO Auto-generated method stub
char[] arr = {'1','2','3'};//元素必须用单引号括起来
String str=new String(arr);
System.out.println(str.toString());
}
任意型数组转字符串
// An highlighted block
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] arr = {1,2,3};
StringBuffer str = new StringBuffer();
for (int s : arr) {
str.append(s);
}
System.out.println(str.toString());
}