Reputation: 1133
When I try to compile this code, I get an error saying:
i
cannot be resolved to a variable
What I´m doing wrong? How can I fix it?
boolean[] onibusDoTrajeto(int trajeto1, int trajeto2){
boolean[] lugaresNoTrajeto = new boolean[49];
for(int j = 0; j < _assentos[0].length; j++) {
for (i = trajeto1; i <= trajeto2; i++){
if (_assentos[i][j] = true){
lugaresNoTrajeto[j] = true;
break;
}
}
}
}
Upvotes: 1
Views: 145