格式 ClassName::new
举例
Function <Integer,MyClass> fun= n->new MyClass(n);
等同于
Function<Integer,MyClass> fun=MyClass::new;
格式 ClassName::new
举例
Function <Integer,MyClass> fun= n->new MyClass(n);
等同于
Function<Integer,MyClass> fun=MyClass::new;
方法引用方法引用的意思就是若Lambda体中的内容有方法已经实现了,我们可以使
通过一个方法名字来引用这个已存在的方法会
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M