摘要:
1 package edu.thread.test; 2 3 public class ThreadTest2 implements Runnable { 4 @Override 5 public void run() { 6 getTicket(); 7 } 8 9 /**10 * 得到车票11 */12 private synchronized void getTicket() {13 while (true) {14 System.out.println(Thread... 阅读全文