作者:手机用户2502883723 | 来源:互联网 | 2023-10-12 12:34
int i = 5;
StringBuilder sb = new StringBuilder(i);
String s = "" + i;
String k = Integer.toString(i);
String u = String.valueOf(i);
Which of these would be the most efficient to convert int to a String in java? Are there any other more efficient methods?
在java中将int转换为String中哪一个最有效?还有其他更有效的方法吗?
1 个解决方案