java怎么把数字转换成字符串

2025-04-27 19:21:32
推荐回答(1个)
回答1:

后面加个空串就行了
int i = 10;
String s = i + "";
或者
String s = String.valueOf(i);