So whats the answer of this one...I thought it to be A and C but as per mocks the only correct answer is A.As per my understanding after starting a new thread, the main thread will stop and as a result, all other threads associated with main thread also stops.. am i right? or is it only the daemon threads that stops when main stops executing.
what happens is that start() asks Virtual Machine to start a new thread and returns *immediately* without waiting for the new thread to be created/started/etc/ That's right - only A is correct. [ September 22, 2003: Message edited by: Andris Spruds ] [ September 22, 2003: Message edited by: Andris Spruds ]
Harjinder: Sounds like you've got it, but this wording is worrisome: is it only the daemon threads that stops when main stops. There's nothing special about the "main" thread. The VM quits when there are no more non-daemon threads alive. Non-daemon threads are called "user" threads. So you could rephrase with something like: it is only user threads that keep the VM running.
The Inner that is named is not the true Inner.
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad: