规范技巧

String 和 int 类型相互转换#

String 转换成 int 类型

int i = Integer.parseInt(String s)

int 转换成 String 类型

String s = String.valueOf(int i)
本文共 33 字