1.实现Runnable
new Thread(() -> System.out.println(11)).start();
2.匿名内部类处理方式
public static void main(String[] args) { ww(() -> System.out.println("111")); } interface MM{ void aa(); } public static void ww(MM mm){ mm.aa(); }
3.
1.实现Runnable
new Thread(() -> System.out.println(11)).start();
2.匿名内部类处理方式
public static void main(String[] args) { ww(() -> System.out.println("111")); } interface MM{ void aa(); } public static void ww(MM mm){ mm.aa(); }
3.