LearnFrenzy
Sign in Take a free test

Concurrency and Executors · Concurrency and Executors MCQ · Question 17

CountDownLatch versus CyclicBarrier Answer, explanation & discussion

  • MCQ
  • Hard
  • 0 comments
  • Answer explained
  • Moderated community
Question 17 Back to Exercise

Which statement is correct?

  • A Both can be reset
  • B A CountDownLatch is one-shot (counts down to zero once); a CyclicBarrier makes a fixed group wait for each other and can be reused Correct
  • C A barrier is one-shot
  • D They are the same
Correct Answer: Option B

Latch: "wait for N events"; barrier: "wait for each other".

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links