package com.insightfullogic.java8.answers.chapter3;

import java.util.Comparator;
import java.util.List;
import java.util.Optional;

public class Question7 {

	// ȡַеСдĸ
	public static int countLowercaseLetters(String string) {
		return (int) string.chars()             //charsIntStream
				.filter(Character::isLowerCase)
				.count();
	}

	// ҳַб,Сдĸַ
	public static Optional<String> mostLowercaseString(List<String> strings) {
		return strings.stream()
				.max(Comparator.comparing(Question7::countLowercaseLetters));
	}
}

@@ -363,16 +363,65 @@
 %D0%B1,%D0%A1%D0%B4%C4%B8%D6%B7%0D%0A
+%09// Optional,http://www.importnew.com/6675.html%0D%0A
 %09public 

添加网页注释，详细介绍了Optional的使用