黑马程序员技术交流社区

标题: 哪里错了 [打印本页]

作者: fanxiaonan    时间: 2015-7-15 01:50
标题: 哪里错了
public class X extends Thread implements Runable{
public void run(){
System.out.println("this is run()");
}
public static void main(String args[])
{
Thread t=new Thread(new X());
t.start();
}
}

作者: 徐会会    时间: 2015-7-15 08:59
首先runnable写错了,其次实现多线程,继承和接口用一个就可以了




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2