I was exploring the Java 8 source and found this particular part of code very surprising:
//defined in IntPipeline.java
@Override
public fin
return reduce(Math::max);
is NOT EQUAL to return reduce(max());
But it means, something like this:
IntBinaryOperator myLambda = (a, b)->{(a >= b) ? a : b};//56 keystrokes I had to type -_-
return reduce(myLambda);
You can just save 47 keystrokes if you write like this
return reduce(Math::max);//Only 9 keystrokes ^_^