java8 方法引用与lambda
2024-09-29 20:55:04
List<String> list = new ArrayList<>(); //list.stream().filter((String s)->System.out.print(s);return s);
String str="sadfasdf";
//str.length()
Function<String,Integer> func1= (s1)->s1.length();
Function<String,Integer> func2= String::length;
Function<String,Integer> func3= (s1)->str.length();
Supplier<Integer> func4= str::length;
最新文章
- 我喜欢的Notepad++插件
- JAVA基础(一)
- OpenCV阶段总结扩充。
- 忧桑三角形,调了半天,真忧桑TAT
- Redis学习笔记(1) Redis介绍及基础
- SilverIight数据绑定实例
- C#使用Fixed创建固定大小的缓冲区
- wcf调用oracle存储过程
- php spl
- [转]Valgrind简单用法
- Angular实现数据绑定,它实现原理是什么?
- nginx 采用https 协议通信配置
- Linux软件大全
- Gitblit配置
- Numpy数组对象的操作-索引机制、切片和迭代方法
- python_如何让类支持比较运算?
- 新ubuntu系统装软件
- python的random模块(生成验证码)
- java1.8 新特性(五 如何使用filter,limit ,skip ,distinct map flatmap ,collect 操作 java集合)
- C++ 表示一个区间值得方法