Category: java8 streams examples

implement a custom class that behaves like an array in Java

We can implement a custom class that behaves like an array by creating a class that has an array as a private field, and implements the necessary methods to access…

Java 8 Streams Lazy Evaluation

In Java 8, streams use a technique called “lazy evaluation” to process data. Lazy evaluation means that a stream operation is not executed until it is absolutely necessary. This can…