JQ+
Question id : 952739433290
In which of the following cases a thread will definitely be alive but not be running ?
a) The thread has issued a call to wait().
b) The thread is trying to enter a synchronized block and the monitor is not free.
c)A higher priority thread comes in ready to run state...
d)The thread is sleeping as a result of a call to the sleep() method
e)The thread call yield().
the answer is a,b,c....
My question is why e is not coreect and
also I would appreciate somebody explaining or giving a link to the behaviour of wait,yield and sleep methods in such cases and illustrate their differences...
I have gone through RHE and Mughal on these topics several times...but I do mistakes on these type of questions again and again..
so having my SCJP on Monday...I would greatly appreciate any clear explaining
of this stuff
thanks in advance
Mounika
Question id : 952739433290
In which of the following cases a thread will definitely be alive but not be running ?
a) The thread has issued a call to wait().
b) The thread is trying to enter a synchronized block and the monitor is not free.
c)A higher priority thread comes in ready to run state...
d)The thread is sleeping as a result of a call to the sleep() method
e)The thread call yield().
the answer is a,b,c....
My question is why e is not coreect and
also I would appreciate somebody explaining or giving a link to the behaviour of wait,yield and sleep methods in such cases and illustrate their differences...
I have gone through RHE and Mughal on these topics several times...but I do mistakes on these type of questions again and again..
so having my SCJP on Monday...I would greatly appreciate any clear explaining
of this stuff
thanks in advance
Mounika