I have a word list text file, I want to get min, max and average word lengths from that file.
I have a stream method:
public static Stream
Based on official documentation about reductions
System.out.println(readWords(filename) .mapToInt(String::length) .average() .getAsDouble() );
Note that you can and probably should use method references like String::length
String::length