Questions « Thread « SCJP

7.12.1.The wait() and notify() methods can be called outside synchronized code(True/False).
7.12.2.Answer: wait and notify
7.12.3.You can specify which thread should be notified in a notify() method call(True/False).
7.12.4.Answer: notify target
7.12.5.Calling wait() moved the thread to the monitor's pool of waiting threads(True/False).
7.12.6.Answer: wait method
7.12.7.Which the following may not be synchronized code?
7.12.8.Answer: synchronized class block
7.12.9.How many locks does an object have?

7.12.10.Answer: object lock
7.12.11.When an application begins running, there is one daemon thread, which runs main() method(True/False).
7.12.12.Answer: daemon thread
7.12.13.When an application begins running, a non-daemon thread runs main() method.
7.12.14.Answer: daemon thread and main
7.12.15.A thread created by a daemon thread is also a daemon thread.
7.12.16.Answer: daemon thread and its child thread
7.12.17.A thread created by a non-daemon thread is initially also a non-daemon thread.
7.12.18.Answer: created by daemon thread
7.12.19.The JVM runs until there is only one daemon thread(True/False).

7.12.20.Answer: daemon thread and exit
7.12.21.The JVM runs until there are no daemon threads(True/False).
7.12.22.Answer: JVM and daemon thread