File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Threads ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Threads ???" Watch "Threads ???" New topic

Threads ???

Soumy Kumar
Ranch Hand

Joined: Nov 02, 2004
Posts: 78

I picked B and C

but answer is C and D

Is it that sleep() needs to be in a try catch its not right to be inserted in line 4 ??
and how about D answer..I don't have idea..

help needed ..


SCJP 1.4<br />" Something is difficult doesn't mean you shouldn't try, it only means you should try harder "
trivikram Kumar
Ranch Hand

Joined: Feb 21, 2005
Posts: 172
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)
Animesh Shrivastava
Ranch Hand

Joined: Jul 19, 2004
Posts: 298
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?

ramaseshan T
Ranch Hand

Joined: Feb 17, 2005
Posts: 30
I didn't see any deprecated methods in the choices and there was no questions on that. But you might get question on what are the deprecated methods in Java 1.4?

SCJP 1.4

Ramaseshan T<br />SCJP 1.4
Jay Pawar
Ranch Hand

Joined: Aug 27, 2004
Posts: 411
Originally posted by ramaseshan T:
But you might get question on what are the deprecated methods in Java 1.4?

I do not think so. SCJP objectives do not mention that.

Cheers,<br />Jay<br /> <br />(SCJP 1.4)<br />Heights of great men were not achieved in one day, they were toiling day and night while their companions slept.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
You're not supposed to know the deprecated methods for the exam at all so they won't appear as options in any answer.

Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
I didn't see any deprecated methods in the choices

From j2SE 1.4.2 API doc:
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.

Mike Gershman
SCJP 1.4, SCWCD in process
I agree. Here's the link:
subject: Threads ???
It's not a secret anymore!