I can't find the name of the ::
operator added in Java 8 in either of the following resources:
As per here, it looks like it's called a method reference operator. It's covered in section 15.13 of the proposed JLS you link to.
However, as rightly pointed out, it appears to be never explicitly named as an operator (unlike all the things like +
, -
and so on). Instead, the JLS simply refers to the entire expression containing ::
as a method reference expression.
It may be that this is because ::
is not considered to be an operator at all but is explicitly called out as a separator (see JLS link 3.11, while the operators are in 3.12).
So I would tend to call it, in the context you're interested in, a method reference separator (or, more generally, the double-colon separator).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With