Check out example codes for "how to convert int into int array of digits in java". It will help you in understanding the concepts better.

Code Example 1

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';
}

Learn ReactJs, React Native from akashmittal.com