This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes SCJP Thread question from MG's mock exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "SCJP Thread question from MG Watch "SCJP Thread question from MG New topic
Author

SCJP Thread question from MG's mock exam

Georgy Bolyuba
Ranch Hand

Joined: Feb 18, 2005
Posts: 162

Which of the following are methods of the Thread class?

1wait()
2yield()
3pause()
4start()

The Correct Answer is
2) yield()

yield is a static method of the Thread class
4) start()

start() is a method of the Thread class and causes the thread to begin execution (a direct quote from the JDK1.4 docs


What about wait() method


SCJP 1.4 (100%) Done.<br />SCJD (URLyBird 1.2.3 Started)
Sergei Iakhnin
Ranch Hand

Joined: Nov 09, 2004
Posts: 53
wait() is a method of the Object class.

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html


SCJP 1.4, SCWCD 1.4
Marcelo Ortega
Ranch Hand

Joined: May 31, 2005
Posts: 519

The wait() method is inherited from the Object class just like the
notify() and the notifyAll() methods.


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJD, SCEA/OCMJEA

Live life to an interface, not an implementation!
Marcus Green
arch rival
Rancher

Joined: Sep 14, 1999
Posts: 2813
The API docs for Thread are at

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html

Where wait is listed as being inherited from Object. Could I have feedback as to if this question is ambigious/misleading?

I have been re-working all the JDK1.4 material for JDK1.5 so if it needs changing it should be changed for the 1.5 material.


SCWCD: Online Course, 50,000+ words and 200+ questions
http://www.examulator.com/moodle/course/view.php?id=5&topic=all
Gail Mikels
Ranch Hand

Joined: May 07, 2001
Posts: 634
maybe worded like "...methods defined in the Thread class..." ?


Gail Mikels
 
jQuery in Action, 2nd edition
 
subject: SCJP Thread question from MG's mock exam
 
Similar Threads
directly stopping a thread
Marcus Mock Question 24
Marcus Mock Exam 3- Q44
to yield() or not to yield()?
Sleep and Yield state