I want to convert the 2D string array into an integer 2D array. How to do that. i tried some things but i cant concentrate right now and id like to finish it today :D Thanks in advance. So... here are all the values of the array:
parts[] []:
[0] "25"
[1] "3"
[2] "18"
[0] "20"
[1] "12"
[2] "18"
[0] "1"
[1] "1"
[2] "15"
//string.length = 3;
String[] [] parts = new String[string.length][];
int[] [] stringToInt = new int[string.length][];
for(int a=0; a<string.length;a++){
for(int b=0; b<3;b++){
stringToInt[a] = Integer.parseInt(parts[a] [b]); <---Error
}
}
stringToInt[a] = Integer.parseInt(parts[a] [b])does? Are you sure you didn't miss there[b]somewhere? Also what error exactly are you getting?