This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
This question is from the mock exam at www.geocities.com/SiliconValley/Screen/5046/ftest1.html. The question says: You have an application which executes the following line: Thread myT = new Thread(); myT.start(); 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? Thanks. Stephanie
Hi, 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).]