字符串转字符数组
char[] ch = str.toCharArray();
字符数组转字符串
String s = new String(ch)
//char[] str = {'h','e', 'l', 'l', 'o', ' ', '1','2','3'};
//String string1 = new String(str); hello 123
数字转字符串
int a = 1
String str = String.valueOf(a);
//或者:
String str = a +"";
字符串转数字
String str = "45";
1. Integer num = new Integer(str);
2. int num1 = Integer.paeseInt(str);
3. Integer num2 = Integer.valueOf(str);
标签:类型转换,ch,String,str,new,字符串,Integer
From: https://www.cnblogs.com/Zx-3-6-0-/p/17583990.html