0

Java 8 Get the Min and Max values in a Stream

First, let’s defined the Java Bean we’ll use to represent something – a Student. Then, we’ll use Java Stream methods – Min and Max – to get the Minimum and Maximum values, respectively.

We could create different codes that perform the same thing but why this is the most easy and convenient way to find out the min and max values.