public static void main(String[] args) {
String str ="a1b2c3d4e5f6d7*ABCDf";
IntStream chars = str.chars();
int reduce = (int) chars.filter(Character::isLowerCase).count();
System.out.println(reduce);
}
Lambda表达式计算字符串中小写字母个数
最新推荐文章于 2023-10-10 20:31:42 发布