在一个字符串集合中,找出包含最多小写字母的字符串先定义方法查询字符串中小写字母的数量
strings.stream().max(Comparator.comparingInt(Main::countLowercaseLetters));
public static int countLowercaseLetters(String string) {return (int) string.chars().filter(Character::isLowerCase).count();}