this is withing the gui where i am calling the method.
seatNumber = x*6 + y+1;
isRserved = flight[h].reserve(seatNumber);
this is my method within another class
public boolean reserve (int seatNumber){
int x = seatNumber / 6;
int y = seatNumber % 6;
if(seat[x][y] == true){
isTaken = true;
seat[x][y] = false;
}
return isTaken;
}
i keep getting a null pointer exception. is this how you call the method for this instance?