![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jdk8
青春1314
这个作者很懒,什么都没留下…
展开
-
用Arrays类截取路径
import java.util.Arrays; import java.util.stream.Collectors; public class Test { public static void main(String [] args) { String path = "com/it/dao"; System.out.println(Test.splitPath(path)); } public static String splitPat.原创 2020-06-24 23:18:07 · 183 阅读 · 0 评论 -
Java8中的Stream操作集合
1、filter:筛选 Student stu1 = new Student(1, 19, "张亮"); Student stu2 = new Student(2, 29, "周文"); Student stu3 = new Student(3, 23, "王彪"); List<Student> stuList = new ArrayList<>(); stuList.add(stu1); ...原创 2020-05-27 00:08:13 · 256 阅读 · 0 评论 -
lambda表达式
1、用lambda表达式实现Runnable new Thread(new Runnable() { @Override public void run() { System.out.println("I am jdk7 running."); } }).start(); new Thread(() -> { System.out.prin...原创 2020-03-05 00:47:54 · 97 阅读 · 0 评论