So, i'm using an array in my program, and it gives me this error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
The error is in fourth line of this code:
int n = numbers.length, numBigger10 = 0;
for (int i = 0; i < n; i++)
if (numbers[i] > 10)
numbersBigger10[i] = numbers[i];
numBigger10++;
What can I do to solve?
If you want to know more details about the error please feel free to ask.