把String转换为包装类型:
方式1: static Xxx valueOf(String str) 把String转换为包装类的对象
Integer i1 = Integer.valueOf("123");
方式2:new Xxx(String str)
Integer i2 = new Integer("123");
把包装类对象转换为String:
String str = 任何对象.toString();
把基本数据类型转换为String:
String str = 17 + " ";
String str = String.valueOf(xxx value);
把String转换为基本数据类型:
static xxx parseXxx(String s) : xxx表示八大基本数据类型
String input = "1234";
int num = Integer.parseInt(input);