「Android誌」Android int to string, string to int, 整數轉字串、字串轉整數

整數轉字串
String stringValue = Integer.toString(12345);
String stringValue = String.valueOf(12345);
字串轉整數
int intValue = Integer.valueOf("12345");
int intValue = Integer.parseInt("12345");

留言