-
What should not be done to avoid deadlock?
-
- Use interruptible locks
- Avoid using multiple threads
- Avoid hold several locks at once
- Execute foreign code while holding a lock
- None of these
Correct Option: D
To avoid deadlock situation in Java programming do not execute foreign code while holding a lock.