Asked by anonymous

does anyone know how to terminate a java program when the user input the wrong answer after x amount of tries

Answers

Answered by 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.
Answered by anonymous
ok thank you oobleck
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions