Default method cannot be static in java interface? -


why can't create interface default static method?

public interface statictest {       default static void display() {          system.out.println("display here");     }   } 

static methods cannot overridden or inherited in meaningful sense, , default methods there overridden or inherited. other non-static interface methods, default implies inheritance meaningful method, incompatible static.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -