Rajiv Rai wrote:Am not able to understand how the program re-ran when i entered 6 as input first time
and pressed Enter.. According to me it should run just once.
Why? What do you think while(true) does?
Tip: Add
else System.out.println("Invalid response"); at line 16, and see what it produces.
Winston
Isn't it funny how there's always time and money enough to do it WRONG?