← Quiz: Java Concurrency Utilities: all 10 questions
Quiz: Java Concurrency Utilities · Question 6 of 10
A CountDownLatch is created with count 3. When does await() return?
A CountDownLatch is created with count 3. When does await() return?
- A.Immediately
- B.After 3 seconds
- C.After countDown() has been called 3 times
- D.After 3 threads have called await()
Answer & explanation
Correct answer: After countDown() has been called 3 times
await blocks until the count reaches zero; each countDown lowers it by one.
Can you get the rest right without peeking?
Take the timed Quiz: Java Concurrency Utilities quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →