Java8 支持不用接口直接通过lambda表达式传入参数。 如果Optional实例有值,调用ifPresent()可以接受接口段或lambda表达式。类似下面的代码: //ifPresent ...
確定! 回上一頁