随笔分类 -  JavaThread

摘要:1 public class CreateThread { 2 public static void main(String[] args) { 3 // 1.使用lambda表达式直接实现Runnable接口中的run()方法 4 Thread thread = new Thread(() -> { 5 System.out.println("创建线程的方式一"); 6 }); 7 // 2.创 阅读全文
posted @ 2019-10-07 22:06 voryla 阅读(387) 评论(0) 推荐(0)