This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
My view is that..when yield is called in the thread..the control is given to the main thread and since there is nothing to be performed in the main thread..the yielded thread will resume as per JVM and then DONE is printed. The same is interpreted in answer D.
Javainn<br /> <br />SCJP,SCWCD,SCBCD,<br />ICED (IBM-287,IBM-484,IBM-486)
IBM certified in DB2 V 8.1 Family Fundamentals (IBM 700)
In my opinion C should be the only answer. Since resume() is deprecated in 1.4, i dont get convinced by D. Well, are such questions expected in SCJP for which the answers contain deprecated methods? Please anyone already given SCJP reply to this?
I didn't see any deprecated methods in the choices
From j2SE 1.4.2 API doc:
resume() Deprecated. This method exists solely for use with suspend(), which has been deprecated because it is deadlock-prone.
Many of the SCJP mock exams were written before the suspend/resume methods were deprecated. I don't think you will see any reference to deprecated methods on the real SCJP 1.4 exam because I did not see them in the exam objectives.