Answer: synchronized class block : Questions « Thread « SCJP
Java Source And Data Type
7.12.8.Answer: synchronized class block
The wait() and notify() methods can be called outside synchronized code(True/False).
Answer: wait and notify
You can specify which thread should be notified in a notify() method call(True/False).
Answer: notify target
Calling wait() moved the thread to the monitor's pool of waiting threads(True/False).
Answer: wait method
Which the following may not be synchronized code?
Answer: synchronized class block
How many locks does an object have?
Answer: object lock
When an application begins running, there is one daemon thread, which runs main() method(True/False).
Answer: daemon thread
When an application begins running, a non-daemon thread runs main() method.
Answer: daemon thread and main
A thread created by a daemon thread is also a daemon thread.
Answer: daemon thread and its child thread
A thread created by a non-daemon thread is initially also a non-daemon thread.
Answer: created by daemon thread
The JVM runs until there is only one daemon thread(True/False).
Answer: daemon thread and exit
The JVM runs until there are no daemon threads(True/False).
Answer: JVM and daemon thread
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.