Page 1 of 1

About Question enthuware.ocpjp.v7.2.1321 :

Posted: Wed Nov 07, 2012 2:05 pm
by ETS User
But the Main Thread ejecute before any other Thread.

Re: About Question enthuware.ocpjp.v7.2.1321 :

Posted: Fri Nov 09, 2012 5:46 am
by admin
Yes, main thread does execute first but in the main thread 2 more user threads are being created here. So, now there are three user threads including the main thread. So the JVM can swap out the main thread and run any of the other two threads at any time.

So the point is that even if the main thread starts first it does not necessarily have to complete first.

HTH,
Paul.