rxjava : stream

This commit is contained in:
haerong22
2022-03-16 17:10:30 +09:00
parent fb89148a66
commit 81e90a39f8
6 changed files with 143 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package _03_stream;
import java.util.List;
public class StreamEx_06 {
public static void main(String[] args) {
List<Dish> vegetarianMenu = Dish.menu.stream()
.filter(Dish::isVegetarian)
.toList();
System.out.println("vegetarianMenu = " + vegetarianMenu);
}
}