Quiz: Java Concurrency Questions

Browse questions from Quiz: Java Concurrency. Each question has options and an explanation.

Questions — Page 1 of 2

  1. Why is implementing Runnable often more flexible than extending Thread?
  2. A class that extends Thread cannot extend another concrete class.
  3. What does volatile primarily guarantee?
  4. volatile alone makes count++ atomic.
  5. Which tool is appropriate for lock-free integer counters?
  6. Atomic classes can help make simple shared updates thread-safe.
  7. Which collection is designed for many reads and rare writes by copying on modification?
  8. A normal ArrayList is automatically safe for concurrent writes from many threads.
  9. A shared boolean stop flag is updated by one thread and read by another. Which keyword is usually enough for visibility?
  10. Why did a HashMap frequency counter fail when multiple threads updated it at the same time?

Browse questions

Next page · Quiz overview

Open on QuizMaker