字符串-〉数字


String s;

int i;

i = Integer.parseInt(s);

数字-〉字符串

String s;

int i;

s = String.valueOf(i);

// 或者 s = Integer.toString(i);