摘要:
public class test04 { public static void main(String[] args) throws InterruptedException { Q q = new Q(); Thread thread = new Thread(q); for (int i = 阅读全文
摘要:
//Runnable接口更适合多线程共用一个资源的情况,并且避免了单继承的限制public class test02 { public static void main(String[] args) { Dog dog = new Dog(); Thread thread = new Thread( 阅读全文