怎么把int类型转换成string

2024-12-23 13:19:26
推荐回答(1个)
回答1:

int i = 123;
String str = ""+i;

就这么简单。或者,

Integer i = 123;
String str = i.toString();

或者,

int i = 123;
String str = String.valueOf(i);