Here you can find the source of maxStringLength(Stream
static int maxStringLength(Stream<String> stringStream)
//package com.java2s; //License from project: Open Source License import java.util.stream.Stream; public class Main { static int maxStringLength(Stream<String> stringStream) { return stringStream.mapToInt(String::length).max().getAsInt(); }//from w ww . ja va 2 s . c o m }