I wondered if it was possible in Java 8 to get references to the methods of standard operators (+, -, <,>, ...).
I want to get it as Foo::+ , where Foo is a certain place where I can get it. Since Java does not allow special characters in method names, I donβt think this is possible?
If the path above does not exist: is there some place where the standard operators are defined as Foo::plus ?
I know that it is possible to define it as a lambda ( (x, y) -> x + y ), but, in my opinion, it can be more expressive in some cases with a reference to a method, as is possible in Haskell.
java lambda java-8 method-reference
F. BΓΆller
source share