June 2018
Beginner
722 pages
18h 47m
English
There are several ways an application can be terminated (and the JVM stopped) programmatically:
If there are no exceptions and infinite loops, the main(String[]) method completes with a return statement or after its last statement is executed. As soon as it happens, the main application thread returns the control flow to the JVM and the JVM stops executing, too.
That is the happy ending, and many applications enjoy it in real-life. Most of our examples, except those when we have demonstrated exceptions or infinite loops, have ended successfully, ...
Read now
Unlock full access