Static methods on interfaces
Brian Goetz
brian.goetz at oracle.com
Mon Dec 17 09:20:15 PST 2012
This is the plan of record. If you're looking for some sort of
yacht-collateralized guarantee, though, we don't offer those.
More strongly, the only way to invoke a static method on an interface is:
DeclaringInterfaceName.methodName(args)
Not subinterfaces, not subclasses, not instances.
On 12/17/2012 12:10 PM, Stephen Colebourne wrote:
> Can we (JSR-310 and more generally) rely on static methods in
> interfaces being in JDK8? It affects a design decision currently in
> progress ;-)
>
> http://mail.openjdk.java.net/pipermail/lambda-dev/2012-December/006969.html
>
> Also, can we assume that static methods are in not inherited by
> implementors (unlike static constants on interfaces)?
>
> Stephen
>
More information about the lambda-dev
mailing list