![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
多线程
风凌渡口
胜天半子,,,
展开
-
Java类锁
/** * Created by 风凌渡口 on 2017/6/21. */ public class TestThread {public static void main(String[] args) { Person p1 = new Person(); p1.name = "杨过"; Person p2 = new Person(); p2.name原创 2017-06-21 11:44:47 · 332 阅读 · 0 评论 -
多线程售票
/** * Created by 风凌渡口 on 2017/6/21. */ public class TestThread {public static void main(String[] args) { final Object lock = new Object(); Ticket ticket = new Ticket(100); Thread t1 =原创 2017-06-23 17:52:05 · 221 阅读 · 0 评论 -
多线程实现订餐取餐
import java.util.Queue; import java.util.concurrent.ArrayBlockingQueue;/** * Created by 风凌渡口 on 2017/6/21. */ public class TestThread {public static void main(String[] args) throws InterruptedExc原创 2017-06-23 20:09:14 · 665 阅读 · 0 评论 -
两个线程交替打印数字
两个线程交替打印数字原创 2019-07-04 18:56:51 · 650 阅读 · 0 评论