摘要:
#同步方法 public class SafeBuyTicket { public static void main(String[] args) { BuyTicket station = new BuyTicket(); new Thread(station,"Tenton").start(); 阅读全文
摘要:
public class Thread1 extends Thread { @Override public void run() { //run方法线程体 for (int i = 0;i < 20;i++){ System.out.println("run运行" + i); } } public 阅读全文