摘要: 函数式接口就是只有一个方法的接口 Function 传入参数T返回参数R /** * @author wuyimin * @create 2021-07-08-22:14 * @description 函数型接口 只要是函数式接口就可以用lambda表达式简化 */ public class Dem 阅读全文
posted @ 2021-07-08 22:35 一拳超人的逆袭 阅读(78) 评论(0) 推荐(0) 编辑
摘要: BlockingQueue什么时候会用到:多线程并发处理,线程池 超时等待 同步队列 Excutors创建线程池 public class Demo01 { public static void main(String[] args) { ExecutorService executorServic 阅读全文
posted @ 2021-07-08 22:00 一拳超人的逆袭 阅读(70) 评论(0) 推荐(0) 编辑
摘要: /** * @author wuyimin * @create 2021-07-08-20:12 * @description 允许同时读,不允许同时写或者同时写和读 */ public class ReadWriteLockDemo { public static void main(String 阅读全文
posted @ 2021-07-08 20:40 一拳超人的逆袭 阅读(27) 评论(0) 推荐(0) 编辑
摘要: public class CallableTest { public static void main(String[] args) throws ExecutionException, InterruptedException { //如何启动Callable MyThread thread=ne 阅读全文
posted @ 2021-07-08 20:07 一拳超人的逆袭 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-07-08 14:05 一拳超人的逆袭 阅读(43) 评论(0) 推荐(0) 编辑