How to make a program close if a person enter's wrong answer?? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to make a program close if a person enter's wrong answer??

for Java only and no error direct program close

29th Jul 2017, 2:59 PM
Jay Milishia
Jay Milishia - avatar
2 Answers
+ 2
Try System.exit(0);
29th Jul 2017, 3:38 PM
Rrestoring faith
Rrestoring faith - avatar
0
@Rrestoring faith Second that motion
29th Jul 2017, 3:48 PM
josef soneja
josef soneja - avatar