随笔分类 -  java8

摘要:java8的stream用户 数据准备: public class Dish { public String name; //菜的名称 public Boolean vegetaian; //是否为素 public Integer calories; //卡路里 public Type type; 阅读全文
posted @ 2019-11-13 21:21 Draymond 阅读(226) 评论(0) 推荐(0)
摘要:1 Consumer 只有输入,没有输出 // #1 函数推导Consumer consumer1 = (s) -> System.out.println(s);consumer1.accept("你好");// #2 第二种写法Consumer consumer2=System.out::prin 阅读全文
posted @ 2019-10-18 07:40 Draymond 阅读(263) 评论(0) 推荐(0)