关于Java中多线程和并行程序设计的问题
如以下代码所展示,请问以下代码有什么错误?
public class Test implements Runnable{
public static void main(String[] args) throws InterruptedException{
new Test();
}
public Test() throws InterruptedException{
Thread thread = new Thread(this);
thread.sleep(1000);
}
public synchronized void run(){}
}
程序没有报错,运行也没有报错,请问代码有什么错误呢?