(String[] args)
| 28 | private final static Lock LOCK = new ReentrantLock(); |
| 29 | |
| 30 | public static void main(String[] args) { |
| 31 | TwoThread twoThread = new TwoThread(); |
| 32 | |
| 33 | Thread t1 = new Thread(new OuNum(twoThread)); |
| 34 | t1.setName("t1"); |
| 35 | |
| 36 | |
| 37 | Thread t2 = new Thread(new JiNum(twoThread)); |
| 38 | t2.setName("t2"); |
| 39 | |
| 40 | t1.start(); |
| 41 | t2.start(); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * 偶数线程 |