wood burning stoves 2.0*
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 Android Security Essentials Live Lessons this week in the Android 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!
 
 
subject: two Dan's question about thread
 
Similar Threads
Threads
Thread synchronize question from JQ+ test
Threads - doubt
interrupt() method can kill a thread??
thread question of Dan Chisholm mock exam