So two days ago I asked for some help, and got some good stuff... Searching arrays for a value at specific indices
Now I've tried to get as far as I could on my own, and I am stuck with an error of "The type of the expression must be an array type but it resolved to int" at if(lLungArray[i]k] == 1)
int[] lLungArray = {1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1};
int lLung;
private void checkHealth() {
// TODO Auto-generated method stub
if(MainActivity.panel1 == 0){
if(MainActivity.panel2 == 0){
int[] secondArray = {0,1,8,9};
int lLungCount = 0;
for(int i=0;i<lLungArray.length;i++){
for(int k:secondArray){
if(lLungArray[i][k] == 1) //Error here {
lLungCount++;
}
}
}
}
}
My project is almost done, but I can't figure out how to resolve this error. If you read my first question, you'll see I am a novice and google hasn't been much help.