问题描述
- 创建线程对象时,integer 的作用是什么?
-
public class TestSale {public static void main(String[] args) { *SaleTicket a=new SaleTicket((Integer)100);* (new Thread(a,"售票厅1")).start(); (new Thread(a,"售票厅2")).start(); (new Thread(a,"售票厅3")).start(); (new Thread(a,"售票厅4")).start(); (new Thread(a,"售票厅5")).start(); (new Thread(a,"售票厅6")).start(); (new Thread(a,"售票厅7")).start(); (new Thread(a,"售票厅8")).start(); (new Thread(a,"售票厅9")).start(); (new Thread(a,"售票厅10")).start(); }
}
时间: 2024-10-30 03:14:19