02 2021 档案

摘要:1 方法引用 方法引用:method reference 方法引用本质上是lambda表达式的一种语法糖 我们可以将方法引用看作是一个【函数指针】,function pointer 1.1 类名::静态方法 list里面有自身的sort方法,方便排序.返回值为void,说明是原地排序,修改的是原数组 阅读全文
posted @ 2021-02-24 15:36 谁给起个名 阅读(81) 评论(0) 推荐(0)
摘要:1 Supplier理解 1.1 JavaDoc阅读 /** * Represents a supplier(供应者) of results. * * <p>There is no requirement that a new or distinct result be returned each 阅读全文
posted @ 2021-02-24 01:06 谁给起个名 阅读(362) 评论(0) 推荐(0)
摘要:1 lambda依赖上下文 1.1 测试lambda表达式 public class Test3 { public static void main(String[] args) { TheInterface1 t1 = () -> {}; TheInterface2 t2 = () -> {}; 阅读全文
posted @ 2021-02-20 13:54 谁给起个名 阅读(118) 评论(0) 推荐(0)
摘要:1 lamnbda 1.1 什么是lambda lambda:In programming languages such as lisp, python and ruby lambda is an operator used to denote anonymous functions(匿名函数) o 阅读全文
posted @ 2021-02-19 16:16 谁给起个名 阅读(63) 评论(0) 推荐(0)