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 mock exam question 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 "mock exam question" Watch "mock exam question" New topic

mock exam question

Stephanie Grasson
Ranch Hand

Joined: Jun 14, 2000
Posts: 347
This question is from the mock exam at
The question says:
You have an application which executes the following line:
Thread myT = new Thread();
Select all of the following statements that are correct:
1. The thread myT is now in a runnable state.
2. The thread myT has the NORM_PRIORITY priority.
3. The thread will die without accomplishing anything.
4. The run method in the class where the statement occurs will be executed.
Correct answers are 1 & 3.
Why not 2?
Vivek Shrivastava
Ranch Hand

Joined: Jun 03, 2000
Posts: 277
I think �2� is not correct because each thread gets its priority from its creating thread. So whatever priority parent thread have the new thread will get the same.
Feel free to correct me.

But here I have problem with option �1�. We all knows that start() method simply register the thread with thread scheduler and eventually thread scheduler will give a chance to this thread to run. So it is in ready to run state not in �runnable� state.
Please correct me. I am having hard time with threads today.
Your response will encourage me.


[This message has been edited by Vivek Shrivastava (edited July 21, 2000).]
vb shah

Joined: Jan 09, 2008
Posts: 8
Runnable implies that "Ready to Run."
I agree. Here's the link:
subject: mock exam question
It's not a secret anymore!