diff --git a/src/main/java/lazy/LazyStreams.java b/src/main/java/lazy/LazyStreams.java index d7b8f28..e864a14 100644 --- a/src/main/java/lazy/LazyStreams.java +++ b/src/main/java/lazy/LazyStreams.java @@ -4,8 +4,6 @@ import java.util.stream.IntStream; public class LazyStreams { - private static final Logger logger = Logger.getLogger(LazyStreams.class.getName()); - public static int multByTwo(int n) { System.out.printf("Inside multByTwo with arg %d on thread %s%n", n, Thread.currentThread().getName()); @@ -30,8 +28,8 @@ public static void main(String[] args) { // Demonstrate laziness using print statements firstEvenDoubleDivBy3 = IntStream.rangeClosed(100, 2_000_000) // .parallel() - .filter(LazyStreams::modByThree) .map(LazyStreams::multByTwo) + .filter(LazyStreams::modByThree) .findFirst().orElse(0); System.out.printf("First even divisible by 3 is %d%n", firstEvenDoubleDivBy3); }