Answer the question
In order to leave comments, you need to log in
What command closes the program?
what to write in the condition to the JButton, which should close the program I
'm just learning to program
Answer the question
In order to leave comments, you need to log in
2 ways for java:
1) System.exit(status) - closes the application normally, calling shutdown hooks before that.
2) Runtime.getRuntime().halt(status) - closes the program in an extreme way without calling hooks.
The first way is preferable. If it’s not clear what shutdown hooks are, then Google will help.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question