Can deadlocks be solved using wait() and notify() ?
843789May 7 2010 — edited May 8 2010I am trying to understand multithreading in Java and I intentionally created a deadlock using 2 objects and 2 threads by means of the synchronized statement, which wait indefinitely on each other, thus invoking a deadlock situation. My question is whether it is possible to solve the deadlock scenario using wait() and notify()? Or are the latter methods used to solve other kinds of problems ? Thanks