A Deadlock is a situation of indefinite waiting where the system is stuck at a particular point and would do nothing useful.
For example Method A is waiting for B's input while B is waiting for C's input and C in turn is waiting for A's input. Here all the 3 methods would continue to wait because they are waiting on one another and the system is stuck.
A deadlock usually occurs while using threads. Threads can lock objects on which they are processing and when multiple threads are waiting for the same object a Dead lock may occur.
The use of the synchronize keyword can be used to avoid such deadlock situations.
Chat with our AI personalities
Data hiding in the java is achieved through the use of encapsulation.
Decoupling is achieved in Java programs through the parser code. To debug the decoupling achieved in Java, run the source code over the parser code first.
Abstraction in Java or Object oriented programming is a way to segregate implementation from interface and one of the five fundamentals along with Encapsulation, Inheritance, Polymorphism, Class and Object. Abstraction in Java is achieved by using interface and abstract class in Java.
JAVA is excellent at security and transaction management, which are achieved by EJB (Enterprise Java Beans ).As EJB is only one distributed technology used for business processing of an organization efficiently. It is more faster as compared to other technologies.
deadlock avoidance