When main() ends, that may or may not be the end of the program i didnt get this line.. Because i think when main() ends it will surely terminate your program as it is main thread. please clear my doubt
Because i think when main() ends it will surely terminate your program as it is main thread.
The program will terminate if all non-daemon threads have terminated. If a GUI is visible then there will be several non-daemon threads, e.g. the event handling thread. In many applications the main method terminates very quickly, right after constructing the GUI. [ August 16, 2006: Message edited by: Ulf Dittmer ]