~/ learn/ java-from-zero/ cards/ The diamond problem with default methods
1 of 4

Type an overriding method that delegates to a specific interface default

Type an overriding method that delegates to a specific interface default

Answer

@Override public String greet() { return A.super.greet(); }

Interface.super.method() is the only way to explicitly call a specific interface's default implementation. It is only valid inside the implementing class, not from outside.

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/e17f6566-5fd0-4dc0-a6b0-8b23459362fb/flashcard utf-8 LF