这东西只是能看懂,用起来还是不熟悉啊,记几个常用的方便用:
Runnable runnable=()->System.out.println(“Running from Lambda”);
new Thread(() -> System.out.println(“do nothing”)).start();
Collections.sort(students,(a,b) -> a.getName().compareTo(b.getName()));
用到了再加
过滤:list = list.stream().filter(c->
System.currentTimeMillis()-c.getEffectiveDate().getTime()>0).collect(Collectors.toList());