:: (double colon) operator in Java 8

前端 未结 17 2822
旧时难觅i
旧时难觅i 2020-11-21 11:10

I was exploring the Java 8 source and found this particular part of code very surprising:

//defined in IntPipeline.java
@Override
public fin         


        
17条回答
  •  攒了一身酷
    2020-11-21 11:49

    In java-8 Streams Reducer in simple works is a function which takes two values as input and returns result after some calculation. this result is fed in next iteration.

    in case of Math:max function, method keeps returning max of two values passed and in the end you have largest number in hand.

提交回复
热议问题