阅读背景:

是否可以在不终止程序的情况下退出main方法?

来源:互联网 

I know about the return statement and have tried it. System.exit(0) also does the same. But using it here terminates the program. Is there any way i can use so that if the user types other input except 1-7 , the program doesn't terminate , so that i don't have to recompile and rerun the program ? Or is it not possible in Java ?I know about the return statement and have trie




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: