Curious about static method references

Brian Goetz brian.goetz at oracle.com
Fri Jun 29 13:08:38 PDT 2012


You can use lambdas as method arguments; a method invocation provides a target type.  (This is complicated due to interactions with method overload selection, but we can do a lot here.)  The method parameter in question needs to be a functional interface type.  

You can take method references to static methods as well as instance methods.  

You can use lambdas as arguments to static methods provided the formal argument type is a functional interface.  

I guess I don't see the problem still?

On Jun 29, 2012, at 1:03 PM, Paulo Levi wrote:

> Ahah sorry. What i meant was if those are the only places where it is allowed to have a lambda (not on method arguments), and if functional interfaces are the only way to use a lambda as a argument, then static methods can be used as arguments or not, considering static methods can't be part of interfaces?



More information about the lambda-dev mailing list