(String[] args)
| 20 | n -> n < val)); |
| 21 | } |
| 22 | public static void main(String[] args) { |
| 23 | show(Stream::allMatch, 10); |
| 24 | show(Stream::allMatch, 4); |
| 25 | show(Stream::anyMatch, 2); |
| 26 | show(Stream::anyMatch, 0); |
| 27 | show(Stream::noneMatch, 5); |
| 28 | show(Stream::noneMatch, 0); |
| 29 | } |
| 30 | } |
| 31 | /* Output: |
| 32 | 1 2 3 4 5 6 7 8 9 true |