2 u010343799 u010343799 于 2014.05.26 14:06 提问

创建线程对象时,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();
}

}

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!