package javavk import java util stream Stream public class Main public

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
package javavk;
import java.util.stream.Stream;
public class Main {
public static void main(String[] args) {
boolean hasOdd = Stream.of(1,2,3,4,5)
.filter(num -> num % 2 != 0)
.peek(System.out::println)
.findAny().isPresent();
System.out.println(hasOdd);
}
}