Question
does anyone know how to terminate a java program when the user input the wrong answer after x amount of tries
Answers
oobleck
exit()
You can return an exit code to indicate failure.
google can provide you with code snippets for almost whatever you want to do. You can be sure that someone has done it, and posted it. Also, the java documentation is excellent.
You can return an exit code to indicate failure.
google can provide you with code snippets for almost whatever you want to do. You can be sure that someone has done it, and posted it. Also, the java documentation is excellent.
anonymous
ok thank you oobleck