摘要:
/*多线程的无限等待机制:wait()方法进入无线等待 notify()解除等待 使用匿名内部类创建多线程两种方式: 第一种Thread子类: MyThread my = new MyThread(); my.start(); 改用匿名内部类 Thread t = new Thread(){ @Ov 阅读全文
摘要:
public class DemoMain { public static void main(String[] args) { //从方法调用,到多态,在到使用匿名内部类 /* 父类MyExtend public class MyExtend { void run(){ System.out.pr 阅读全文