楼主要想实现想要的效果,应该修改以上程序:
public class MyThread extends Thread
{
public void run(){
System.out.println("run() called");
}
public static void main(String args[]) {
new MyThread().start();
}
}
如此的话,程序运行,调用线程的start方法启动线程后会打印:run() called作者: 赵永康 时间: 2012-9-22 10:03
public class MyThread extends Thread
{
public int run(int time){ //该方法并不是在复写线程的run方法,标准的应该是