I am learning Java via the wonderful Absolute Java book by Walter Savitch.
I am trying to work through one of the programming exercises and I am having trouble figuring out why the program is working like it is.
Here is the code:
When I execute the code and enter, say, 7 seat assignments, it only picks up the 1st, 2nd, 4th, and 6th entries. I suspect that it has something to do with how the scanner class works (I know you have to do console.nextLine() in order to discard the /n) but I can't seem to be able to correct it.
Can anyone help?
Thanks,
Charles