Machine-translated by Google. Questions are authored in English.
Top

Discussion

Which of these types is NOT in java.util.concurrent?

  • A.CyclicBarrier
  • B.Exchanger
  • C.ReentrantLock
  • D.Semaphore

Answer: C

Correct answer: ReentrantLock

ReentrantLock lives in java.util.concurrent.locks, along with ReadWriteLock, Condition and StampedLock. The others are directly in java.util.concurrent, which is why importing that package alone leaves the locks unavailable.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.