![](https://csdnimg.cn/release/download_crawler_static/85860896/bg4.jpg)
7.2/
List<String> dishNames = new ArrayList<>();
for(Dish dish: menu){
if(dish.getCalories() > 300){
dishNames.add(dish.getName());
}
}
Stream API
menu.parallelStream()
.filter(d -> d.getCalories() > 300)
.map(Dish::getName)
.collect(toList());
Stream API
break
continue
return
8.1.5
23Lambda
Lambda
Predicate
Comparator
Lambda
1
Lambda
Lambda
Lambda
2.
Java
Logger
if (logger.isLoggable(Log.FINER)){
logger.finer("Problem: " + generateDiagnostic());
}