
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 · 200 阅读 · 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 · 278 阅读 · 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 · 107 阅读 · 0 评论