查了好几遍了,记录下
There are many ways to convert an Integer to String in Java e.g. by using Integer.toString(int) or by using String.valueOf(int), or by using new Integer(int).toString(), or by using String.format() method, or by using DecimalFormat, String concatenation, or by using StringBuilder and StringBuffer etc.
精简版:
1. Integer.toString(int)
2. String.valueOf(int)
3.Integer(int).toString()
顺便复习下Java int 和 Integer的区别
int 是一种基本数据类型
Integer 是一个类,有很多内置方法