string str = " 1289898 ";
2. Declare an int array according to the length of the string.
int ia[]= new int[str . length()];
3. Loop the string and get the string through charAt.
for(int I = 0; I & ltstr. length (); i++){
char c = str . charat(I); //Get the characters in the string one by one.
}
4. Subtract the' 0' character from the obtained string C, which is the actual number.
for(int I = 0; I & ltstr. length (); i++){
char c = str . charat(I); //Get the characters in the string one by one.
ia[I]=(int)(c-' 0 '); //Number of Characters-The character 0 is the actual numeric value and is assigned to the numeric array.
}