It is all right to use System.exit(int) in a simple application with a single
thread, but in a multi-threaded application it can be harmful; if you stop your JVM while a thread is still doing something, that something might only be half-done. You might have half a record written to a file, and that file will be corrupt for next time it is used.