//传两个数,计算他们的和
(int a, int b) -> a + b;
// 不用类型声明,传两个数,计算他们的差
(a, b) -> a - b;
// 大括号中的返回语句
(int a, int b) -> {
return a * b;
};
Stream:
//过滤集合中的当前副本id等于集合中副本id的条目数,并且用collect收集起来 Listcollect = list.stream().filter(s -> s.getInstanceId() == cfgInstance.getId()).collect(Collectors.toList()); //获取collect集合的id值最小的那一个id ancientId = collect.stream().mapToInt(CfgAncientBattleKillDrop::getId).min().getAsInt();



