When is it a good idea to call notifyAll in a synchronized method?
A) Whenever you exit it.
B) Upon exit, but only if threads before have called wait.
C) Upon exit, but only if the thread has replenished a needed resource.
D) Immediately upon entering the method.
Correct Answer:
Verified
Q60: Which phrase best describes the purpose of
Q61: Consider an old fashioned telephone booth that
Q62: A GUI should be responsive to the
Q63: Calling the wait method in synchronized code
Q64: Which are ways that a thread can
Q66: Under what conditions are locks unnecessary for
Q67: Assume three threads share a BankAccount object
Q68: What happens when a thread calls the
Q69: lock objects ensure that shared data are
Q70: Why does the textbook recommend signallAll over
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents