Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java stream findAny

Integer[] numbers = { 2, 3, 4, 5, 6, 7, 8, 9, 10};
        final Integer any = Arrays.stream(numbers)
                .filter(n -> n < 10)
                .findAny()
                .get();
        System.out.println(any);
 
PREVIOUS NEXT
Tagged: #java #stream #findAny
ADD COMMENT
Topic
Name
2+3 =