摘要:
接口定义 public interface Flyable { void fly(String s); } View Code 测试类 public class FlyableDemo { public static void main(String[] args) { //使用匿名内部类 useF 阅读全文
摘要:
接口定义 public interface Eatable { void eat(); } View Code 接口实现类 public class EatableImp implements Eatable{ @Override public void eat() { System.out.pri 阅读全文
摘要:
public class LambdaDemo { public static void main(String[] args) { //正常实现一个多线程程序 MyRunnable mr = new MyRunnable(); Thread t = new Thread(mr); t.start( 阅读全文