文件名称:Train
- 所属分类:
- JSP源码/Java
- 资源属性:
- [Java] [源码]
- 上传时间:
- 2017-10-19
- 文件大小:
- 4kb
- 下载次数:
- 0次
- 提 供 者:
- YYY***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
假设有火车票1000张,创建10个线程模拟10个售票点,每个售票点100毫秒售出一张票。请模拟并打印出售票过程。注意使用synchronized确保同一张票只能卖出一次。输出格式如下:
第4售票点卖出第100张票 第2售票点卖出第101张票……(Suppose there were 1000 tickets, 10 threads were created, 10 tickets were sold, and each ticket sold one ticket in 100 milliseconds. Please simulate and print the ticket selling process. Pay attention to using synchronized to ensure that the same ticket can only be sold once. The output format is as follows:
Fourth tickets sold 100th tickets, second tickets sold 101st tickets......)
第4售票点卖出第100张票 第2售票点卖出第101张票……(Suppose there were 1000 tickets, 10 threads were created, 10 tickets were sold, and each ticket sold one ticket in 100 milliseconds. Please simulate and print the ticket selling process. Pay attention to using synchronized to ensure that the same ticket can only be sold once. The output format is as follows:
Fourth tickets sold 100th tickets, second tickets sold 101st tickets......)
相关搜索: java
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Train
Train\.classpath
Train\.project
Train\.settings
Train\.settings\org.eclipse.jdt.core.prefs
Train\bin
Train\bin\Resource.class
Train\bin\Seller.class
Train\bin\Test.class
Train\src
Train\src\Test.java
Train\.classpath
Train\.project
Train\.settings
Train\.settings\org.eclipse.jdt.core.prefs
Train\bin
Train\bin\Resource.class
Train\bin\Seller.class
Train\bin\Test.class
Train\src
Train\src\Test.java