Intermediate Java
Q70 / 100

What is a deadlock in Java?

Correct! Well done.

Incorrect.

The correct answer is B) A situation where two or more threads wait for each other's locks indefinitely

B

Correct Answer

A situation where two or more threads wait for each other's locks indefinitely

Explanation

Deadlock occurs when Thread A holds lock X and waits for lock Y, while Thread B holds lock Y and waits for lock X — both block forever.

Progress
70/100