如何将整数 int 转换成字串 String ?
- 1、String s = String.valueOf(i);
- 2、String s = Integer.toString(i);
- 3、String s = "" + i;
如何将整数 String 转换成字串 int?
1、i=Integer.parseInt(s);
2、i=Integer.valueOf(s).intValue();
1、i=Integer.parseInt(s);
2、i=Integer.valueOf(s).intValue();