整型转为字符串
函数
返回值 | 用法 |
---|---|
String | String.valueOf(int i); |
String | Integer.toString(int i); |
字符串转为整型
函数
返回值 | 用法 |
---|---|
int | Integer.parseInt(String str); |
int | Integer.valueOf(String str).intValue(); |
其他类型差不多。。。懒得敲<_<
函数
返回值 | 用法 |
---|---|
String | String.valueOf(int i); |
String | Integer.toString(int i); |
函数
返回值 | 用法 |
---|---|
int | Integer.parseInt(String str); |
int | Integer.valueOf(String str).intValue(); |
其他类型差不多。。。懒得敲<_<