I read this statement:
The main thread must be the last thread to finish execution. When the main thread stops, the program terminates.
When the main thread stops, the program terminates.
The program terminates when there no longer is any non-daemon thread running (or someone called System.exit). The main thread can have finished long ago.