Mastering Java: The Ultimate Quiz for 'Thinking in Java'

Disable ads (and more) with a membership for a one time $2.99 payment

Dive into the depths of Java with our quiz based on "Thinking in Java, Fourth Edition" by Bruce Eckel. Test your knowledge, solidify concepts, and prepare for certification with challenging questions and insightful feedback.

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which strategy can NOT solve a deadlock condition?

  1. Using a timeout

  2. Preemptively taking resources away

  3. Preventing circular waits

  4. Reducing the number of resources

The correct answer is: Preemptively taking resources away

Taking preemptive resources away as a strategy to solve a deadlock condition is not effective because it can lead to starvation, where one process continually takes resources away from another, causing it to never complete its task. Using a timeout, preventing circular waits, and reducing the number of resources are all effective strategies for solving deadlock conditions.