zxy0307's picture
Upload 2300 files
0284885 verified
Raw History Blame Contribute Delete
364 Bytes
package Thread_safe_package;
public class Thread_demo4 {
public static void main(String[] args) {
/*
需求:
死锁
*/
MyThread3 t1 = new MyThread3();
MyThread3 t2 = new MyThread3();
t1.setName("线程A");
t2.setName("线程B");
t1.start();
t2.start();
}
}