Java 8 Streams are not completely Lazy!
Java 8 streams are lazy. The intermediate operations will not be executed till a terminal operation is invoked. But, Java 8 streams flatMap are not lazy.
flatmap
Java 8 streams are lazy. The intermediate operations will not be executed till a terminal operation is invoked. But, Java 8 streams flatMap are not lazy.