kennith stomps wrote:
Carey Brown wrote:You are repeating the same problem. You are passing in a variable "op" and then not using it. Only pass in the values you actually need to perform some operation.
You didn't follow my example correctly. You still need to call getMenuOption() inside the do() loop.
Carey Brown wrote:That's because you've defined "choice" inside the "do" block. Outside of the block (which ends with a '}') the variable goes out of scope and is no longer visible. The while() expression is outside of the block, hence, cannot see "choice". (You're not the only one to get confused by this.) The solution is to define "choice" before you enter the "do" block.