1.

What should not be done to avoid deadlock?(a) Avoid using multiple threads(b) Avoid hold several locks at once(c) Execute foreign code while holding a lock(d) Use interruptible locksI have been asked this question in examination.Question is from Multithreading topic in chapter Multithreading of Java

Answer»

Correct CHOICE is (C) Execute foreign CODE while holding a lock

The best EXPLANATION: To avoid deadlock situation in Java programming do not execute foreign code while holding a lock.



Discussion

No Comment Found

Related InterviewSolutions