Learn deadlock in Java with example, how to detect deadlock, conditions for occurring deadlock, how to avoid deadlock in Java program