Loading…
Loading…
Ten exam-style questions on the Lock framework and coordination tools: ReentrantLock, lock and unlock, tryLock with and without a timeout, hold counts, IllegalMonitorStateException, ReentrantReadWriteLock and CyclicBarrier, with explanations.
Practice questions for the article Java Locks: ReentrantLock, tryLock, ReadWriteLock and CyclicBarrier.
Every compile and output claim was checked against a real JDK. Aim for at least 8 out of 10.
Quiz path: step 93. Take the quizzes in this order, after reading each article.
Previous quiz: Thread Safety, volatile, Atomic Classes and synchronized (OCP 21)
Next quiz: Concurrent Collections, Deadlock, Starvation and Livelock (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.