About Question com.enthuware.ets.scjp.v6.2.218 :

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 com.enthuware.ets.scjp.v6.2.218 :

Post by ETS User »

i don't understand how this answer is correct....
yield() allows threads with equal priority to take graceful turns... but here threads are not of equal priority so the highest priority thread executes first followed by second highest one....

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

Re: About Question com.enthuware.ets.scjp.v6.2.218 :

Post by admin »

It means that if you have multiple threads with same priority and if one thread calls yield, other threads may get a chance to execute. But if two threads are of different priorities and if the higher priority thread calls yield, the thread with lower priority will not be benefited.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 114 guests