I'm getting a null pointer exception on lines 17, and 22. I'm not positive, but does it have to do with "int number1 = data[0];" having to be static?
int number = 100;
public static final int[][] NUMBERS = {
{ 1205, 1206 }
};
public static boolean method1() {
int used1, used2;
for (int[] data : NUMBERS) {
int number1 = data[0];
int number2 = data[1];
}
if (used1 == number && used2 == number1) {
method2(number, number1, number2);
}
}
public static boolean method2() {
int count = getCount(number1);
if (count <= 5) {
//DO STUFF HERE
return true;
}
else if (count > 5) {
//DO STUFF HERE
return true;
}
return false;
}