What is Thread deadlock

If a thread is waiting for an object that is already locked by another thread and the other thread is waiting for the object which was already locked by first thread, then the two threads will continue in waiting state for ever. This is called thread dead lock.

When deadlock occures further execution of program is suspended. Generally, deadlock occures when multiple threads are used on same group of objects which have been Synchronized. 

Solution to avoid the dead locks : 

1. There is no solution for dead locks. 

2. The programmer has to design the program in such a way to avoid any deadloocks.