若一个类继承Thread或Runnable,则用static修饰run方法会编译错误
public class StaticThread extends Thread {
//编译错误:This static method cannot hide the instance method from Thread
public static void run(){
}
}
若一个类继承Thread或Runnable,则用static修饰run方法会编译错误
public class StaticThread extends Thread {
//编译错误:This static method cannot hide the instance method from Thread
public static void run(){
}
}