aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes two Dan's question about thread Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "two Dan Watch "two Dan New topic
Author

two Dan's question about thread

dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
1.Which of the following are true?
g. No restriction is placed on the number of threads that can enter a synchronized method.
question: why this answer is wrong?
2.Which of the following will force a thread to move into the Not-Runnable state?
c. Thread.join method.
question: who can tell me why this answer is right?


scjp 1.4<br />challenge haven't limit!
Alfred Kemety
Ranch Hand

Joined: Aug 14, 2002
Posts: 279
About Thread.join() please check this post Salient join() characteristics
About the first one, Not more than one thread can access synchronized methods since the Thread has to own the monitor of the object the method belongs to, and since not 2 threads can own the monitor of an object then there ARE restrictions on this issue.


Alfred Raouf - Egypt - SCJP 1.4<br />Kemety.equals(Egyptian) // returns true
dragon ji
Ranch Hand

Joined: Oct 31, 2002
Posts: 110
thanx a lot!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: two Dan's question about thread