摘要: lamda表达式是将只有一个方法的接口,采用简化代码的方式调用方法的途径。 /** * lamda表达式 */ public class TestThread { public static void main(String[] args) { Ilove ilove = null; //带参数的调 阅读全文
posted @ 2022-08-25 01:04 程序员亮亮丫!! 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 1.interrupt终端线程 public static void main(String[] args) throws InterruptedException { //创建子线程 Thread thread1=new Thread(()->{ while (!Thread.currentThr 阅读全文
posted @ 2022-08-25 00:58 程序员亮亮丫!! 阅读(34) 评论(0) 推荐(0) 编辑