//售票窗口
public class SealWindow
{
public static void main(String[] args)
{
new Thread(new TicketSealCenter(), "1号窗口").start();
new Thread(new TicketSealCenter(), "2号窗口").start();
new Thread(new TicketSealCenter(), "3号窗口").start();
new Thread(new TicketSealCenter(), "4号窗口").start();
new Thread(new TicketSealCenter(), "5号窗口").start();
new Thread(new TicketSealCenter(), "6号窗口").start(); }}// 售票中心
class TicketSealCenter implements Runnable
{ private void sale() throws Exception
{
Ticket ticket = new Ticket();
// 售票中心分配火车票
ticket.setTicketNum(100); while (ticket.isEmple())
{