標籤

2009年12月1日 星期二

字串 數字 轉換

字串 String 轉換成整數 int
int i = Integer.parseInt([String]);
int i = Integer.valueOf(my_str).intValue();
整數 int 轉換成字串 String ?
String s = String.valueOf(i);
String s = Integer.toString(i);
String s = "" + i;