Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlindispatch virtual vs staticSingle-choice MCQ

Consider an interface with a default method body in Kotlin (a non-abstract interface member). On the JVM, how does the Kotlin compiler make the default body available to implementing classes, and what dispatch is used when an implementor that does NOT override it is called?

interface Greeter { fun greet(): String = "hi" } class Eng : Greeter fun call(g: Greeter) = g.greet()