With an invalid entry, this function call will not return (eg it'll keep running through your loop regardless of what you enter
Kind of...for an invalid entry, you call setOrder which indirectly...
Type: Posts; User: copeg
With an invalid entry, this function call will not return (eg it'll keep running through your loop regardless of what you enter
Kind of...for an invalid entry, you call setOrder which indirectly...
I think I see what your question is...
It does change, but the way your program runs the output makes it look different. How about drawing out the program stack trace as it runs. This is sketched...
If you are referring to the line:
System.out.println(numberOfOrders);// why is the value of this PARAMETER stuck in the first value that had been passed to it? (why does it never change?)
...
You seem to be getting variable clashes...notice that the parameter name of setOrder is the same as the instance variable 'numberOfOrders'. This can cause conflicts between the two, and your do/while...