Domanda di colloquio di Société Générale

how to prevent deadlock in java multithreading