What is the difference between abstract class and interface in Kotlin?
Answer
Both can have abstract methods and default implementations, but they differ in key ways. An abstract class can have constructors, state (backing fields), and init blocks — it models a strong "is-a" relationship. A class can extend only one abstract class. An interface cannot have constructors or store state (interface properties have no backing field), but a class can implement multiple interfaces. Use abstract classes for shared state and initialization logic; use interfaces to define capabilities (Serializable, Clickable) or when multiple inheritance of type is needed. Interfaces compiled with default implementations produce Java 8 default methods on the JVM.
Previous
What is the expect/actual mechanism in Kotlin Multiplatform?
Next
What is the internal visibility modifier in Kotlin?