Static methods on interfaces

Zhong Yu zhong.j.yu at gmail.com
Mon Dec 17 09:49:13 PST 2012


On Mon, Dec 17, 2012 at 11:20 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> 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.

what about import static?

>
> 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