thank you for replying.
but what if I simply change "reply.findInLine(.).charAt(0)" to "reply.findInLine("y").charAt(0)" in my code (I want to do it the way I have done i.e., while loop)?
Shouldn't...
Type: Posts; User: worldchamp
thank you for replying.
but what if I simply change "reply.findInLine(.).charAt(0)" to "reply.findInLine("y").charAt(0)" in my code (I want to do it the way I have done i.e., while loop)?
Shouldn't...
If I press 'n' the output is as desired:
Welcome to the dice game! Want to play?: Y/N
n
Exiting game!
Process completed.
However, if I enter 'y', the exception shows up:
The following code is supposed to generate random numbers and give some output as long as the user wants to continue. But the problem is it gives an exception if I press 'y'. No problem occurs if I...