Ace Java 2025: Rock Your 'Thinking in Java' Challenge!

Question: 1 / 510

What makes CyclicBarrier different from CountDownLatch?

CyclicBarrier can be reset.

A CyclicBarrier can be reset, meaning that it can be reused for a new set of tasks after the barrier has been reached. This is different from a CountDownLatch, which can only be used once and cannot be reset for another set of tasks.

Option B is incorrect because CyclicBarrier and CountDownLatch both can be used for thread synchronization.

Option C is incorrect because CyclicBarrier and CountDownLatch both allow tasks to run in parallel.

Option D is incorrect because only the initial count of CountDownLatch can be set, but it cannot be incremented further.

Get further explanation with Examzify DeepDiveBeta

CyclicBarrier cannot be used for thread synchronization.

CountDownLatch allows tasks to run in parallel.

CountDownLatch count can be incremented.

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy