string to int(字串轉整數)

1. int intValue = Integer.valueOf("12345");

2. int intValue = Integer.parseInt("12345");

int to String(整數轉字串)

1. String stringValue = Integer.toString(12345);

2. String stringValue = String.valueOf(12345);

3. String stringValue = new String(""+12345);

arrow
arrow
    全站熱搜

    小犬 發表在 痞客邦 留言(0) 人氣()