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
Post a Comment