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...
@Norm: Well I solved the problem. The error arose due to mismatch in text formats.
When I deleted the quotation marks and entered them again. it ran perfectly.
Sorry for the inconvenience. Thanks....
I've been trying the following code for a while but in vain. I've tried simple text editors and even various IDEs. Please tell me what's wrong with this:
import java.util.Random;
class...