A classic deadlock requires at least two threads circularly waiting on each other, so it can't happen in the traditional sense with a single thread — but a single thread can still lock itself up permanently through a related failure mode sometimes called self-deadlock.
If a thread holding a custom non-reentrant lock recursively calls a method that tries to acquire the same lock again, it ends up waiting forever for itself to release a lock it's still holding — a self-inflicted deadlock rather than the usual two-thread circular wait.
A concise interview answer is
A true deadlock needs at least two threads waiting on each other, so it can't happen with just one. But a single thread can effectively deadlock itself, called self-deadlock, if it tries to reacquire a non-reentrant lock it already holds — Java's own synchronized keyword avoids this because intrinsic locks are reentrant.
Last updated: 16 July 2026
Previous question: Can volatile variables be used as a replacement for synchronization?
Next question: What is a synchronized collection, and how does it differ from a concurrent collection?