package cn.sasa.demo4; public class ThreadDemo { public static void main(String[] args){ DeadLockRunnable dead = new DeadLockRunnable(); Thread t0 = new Thread(dead); Thread t1 = new Thread(dead); Thread t2 = new Thread(dead); t0.start(); t1.start();…