📜  如何在 java 代码示例中将 int 转换为 int 数字数组

📅  最后修改于: 2022-03-11 14:52:30.359000             🧑  作者: Mango

代码示例2
String temp = Integer.toString(guess);
int[] newGuess = new int[temp.length()];
for (int i = 0; i < temp.length(); i++)
{
    newGuess[i] = temp.charAt(i) - '0';
}