I keep getting a NullPointerException at (see below). Everything works fine in C#, but in android it breaks?
arrDBNumbers is full and code is supposed to run through and count the amount of #1, #2, #3 and so on to #49 adding 1 to arrFreq[i][1] to fill arrFreq with the total count of the numbers.
It runs through the if statement till k hits 6 where arrDBNumbers[0][6] is 1, then jumps inside if statement and then breaks? I'm not sure whats going on here any advice thanks in advance T
Integer[][] arrDBNumbers = new Integer[100][8];
Integer[][] arrFreq = new Integer[49][2];
for (int i = 0; i < 49; i++){
for (int j = 0; j < 49; j++){
for (int k = 1; k < 7; k++){
if (arrDBNumbers[j][k] == (i + 1)){
arrFreq[i][1]++; // < here is where I get Exception?
}
}
}
}
iwhen the exception is thrown?i+1ifiis 48..?Integers rather thanints?