首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2SE开发 >

错误

2012-03-03 
异常求助啊classTicketsThreadextendsThread{inttickets100publicvoidrun(){while(true){if(tickets0)

异常求助啊
class   TicketsThread   extends   Thread{
int   tickets   =   100;
public   void   run(){
while(true){
if(tickets   ==   0)
break;
System.out.println(Thread.currentThread().getName()+ "ticktes: "+tickets--);
}
}
}

class   Two{
public   static   void   man(String[]   args){  
TicketsThread   tt   =   new   TicketsThread();
tt.start();
}
}

为什么会出现异常??
Exception   in   thread   "main "   java.lang.NoSuchMethodError:   main

[解决办法]
public static void man(String[] args){

写错了 应该是main

热点排行