:: (double colon) operator in Java 8

前端 未结 17 2823
旧时难觅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:52

    At runtime they behave a exactly the same.The bytecode may/not be same (For above Incase,it generates the same bytecode(complie above and check javaap -c;))

    At runtime they behave a exactly the same.method(math::max);,it generates the same math (complie above and check javap -c;))

提交回复
热议问题