*Java 8中的(双冒号)运算符
//defined in IntPipeline.java@Overridepublic final OptionalInt reduce(IntBinaryOperator op) { return evaluate(ReduceOps.makeInt(op));}@Overridepublic final OptionalInt max() { return reduce(Math::max); //this is the gotcha line}//defined in Math.javapublic static int max(int a, int b) { return (a >= b) ? a : b;}
Math::max
static
IntBinaryOperator
?
慕娘9325324
相关分类