since main()
runs on a thread. and as soon as the main()
finishes, main-thread should stop. So if main()
has invoked a long running thread which is yet to finish even after main()
has done all the task. Since main()
is returned, would the other threads be terminated? i guess no. but why?
public static void main(String[] s){
new LongRunningThread().start();
}