class Ticket implements runnavble
{
int ticket=100;
public void run()
{
whlie(ticket>0)
{
System.out.println(Threat.currentThreat().getName()+"sale"+ticket);
ticket--;
}
}
}
class TicketDemo
{
public static void main(String[] args)
{
Ticket d=new Ticket();
Threat t1=new Threat(d);
Threat t2=new Threat(d);
Threat t3=new Threat(d);
Threat t4=new Threat(d);
t1.start();
t2.start();
t3.start();
t4.start();
}
}这个程序哪里错了 为何不能运行? |
|