About Question enthuware.ocpjp.v7.2.1321 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
ETS User

About Question enthuware.ocpjp.v7.2.1321 :

Post by ETS User »

But the Main Thread ejecute before any other Thread.

Online
admin
Site Admin
Posts: 10388
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post 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.

Post Reply

Who is online

Users browsing this forum: admin, Google [Bot] and 5 guests