/    Sign up×
Community /Pin to ProfileBookmark

Hi In my application, I am using:

if(choice == 4)
System.exit(choice);

And it won’t exit the app, any ideas?

to post a comment
Java

6 Comments(s)

Copy linkTweet thisAlerts:
@chazzyMar 11.2006 — and choice is an int right?

What about Runtime.getRuntime().exit(choice);

does that work any differently in your use?
Copy linkTweet thisAlerts:
@comptech520authorMar 11.2006 — I forgot to tell you that I am using the console (eclipse)
Copy linkTweet thisAlerts:
@Khalid_AliMar 11.2006 — [b]

Runtime.getRuntime().exit(choice);

[/b]


is prety much the same as System.exit();

however my guess is that System.exit is not being called at all?

Did u make sure that choice==4 at all?
Copy linkTweet thisAlerts:
@comptech520authorMar 11.2006 — Thank you for your help ?
Copy linkTweet thisAlerts:
@comptech520authorMar 11.2006 — By the way whats easier, Java or C++?
Copy linkTweet thisAlerts:
@Khalid_AliMar 11.2006 — java.....and am glad to be of help...:-)
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...