枚举类型:类型安全,容易输入,代码清晰
包装类:
自动装箱:基本类型转包装类型
自动拆箱:包装类型转基本类型
基本类型转字符串:
String.ValueOf(基本类型)
Character.toString(‘h’);
字符串转基本类型:
Integer.parseInt(字符串类型)
Math:
String
枚举类型:类型安全,容易输入,代码清晰
包装类:
自动装箱:基本类型转包装类型
自动拆箱:包装类型转基本类型
基本类型转字符串:
String.ValueOf(基本类型)
Character.toString(‘h’);
字符串转基本类型:
Integer.parseInt(字符串类型)
Math:
String