About Question enthuware.ocpjp.v7.2.1321 :
Moderator: admin
About Question enthuware.ocpjp.v7.2.1321 :
But the Main Thread ejecute before any other Thread.
-
- Site Admin
- Posts: 10386
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1321 :
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.
So the point is that even if the main thread starts first it does not necessarily have to complete first.
HTH,
Paul.
Who is online
Users browsing this forum: No registered users and 6 guests