SellTicketDemo.java 452 B

12345678910111213141516171819202122
  1. package J20250730.demo10_lock;
  2. /**
  3. * @author WanJl
  4. * @version 1.0
  5. * @title SellTicketDemo
  6. * @description
  7. * @create 2025/7/30
  8. */
  9. public class SellTicketDemo {
  10. public static void main(String[] args) {
  11. SellTicket st=new SellTicket();
  12. Thread t1=new Thread(st,"窗口1");
  13. Thread t2=new Thread(st,"窗口2");
  14. Thread t3=new Thread(st,"窗口3");
  15. t1.start();
  16. t2.start();
  17. t3.start();
  18. }
  19. }