Hi sonir, Deadlocks are an important concept for the exam; you need to be able to recognize when they occur. Deadlock usually occurs when two threads are each waiting for the other to give up the lock. For example, ThreadA gets the lock and then calls ThreadB but ThreadB can't do anything until ThreadA realeases the lock; which it won't do until it's call to ThreadB is is complete. Deadlock.
when can we use them and how?
You don't want to use them; you want to avoid them! Hope that helps. ------------------ Jane Griscti Sun Certified Programmer for the Java� 2 Platform Co-author Mike Meyers' Java 2 Certification Passport