What is deadlock and how to avoid this?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
deadlock is the uneven condition occured between two
synchronized methods calling each other on each others bodies.
we can avoid dead lock threw inter thread communication by
calling wait notify and notifyall methods of object class
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / priyavarzhni
Deadlock is avoided by synchronising the code.
| Is This Answer Correct ? | 0 Yes | 5 No |
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
What is a compilation unit?
How do you use wildcards?
what is meant by encapsulation?
How to change the priority of thread or how to set the priority of thread?
What is the longest unicode character?
What purpose do the keywords final, finally, and finalize fulfill?
what do you mean by classloader in java?
Can we override constructor in java?
What is the role of the java.rmi.naming class?
Why do we need array in java?
What is Mutex (Mutual Exclusion Object) ?