Students often ask for help and show me various things they have done in programs which has caused
them some grief. Some of these are nasty gotchas, and some are really poor examples of
things you don't want to do. Enjoy!
boolean loop_again;
while (loop_again
Note what operator is bein used inside of the parenthesis?
grades[numElem++] = Double.parseDouble(strGrade);
The problem here is if the parseDouble fails, numElem increments anyway, which gives an incorrect count.
©2018, Mark A. Thomas. All Rights Reserved.