/ * *
* 将字符数组转为整型数组
* @param c
* @return
* @throws NumberFormatException
*/
public int[] converCharToInt(char[] c) throws NumberFormatException {
int[] a = new int[c.length];
int k = 0;
for (char temp : c) {
a[k++] = Integer.parseInt(String.valueOf(temp));
}
return a;
}
字符数组转为整型数组
最新推荐文章于 2024-09-14 20:10:38 发布