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

Extension functions in Kotlin are compiled to static methods. Given the override-looking snippet, what is printed and why?

open class Shape class Circle : Shape() fun Shape.area() = "shape" fun Circle.area() = "circle" fun main() { val s: Shape = Circle() println(s.area()) }