Basic Interface
suggest changeA Kotlin interface contains declarations of abstract methods, and default method implementations although they cannot store state.
interface MyInterface {
fun bar()
}
This interface can now be implemented by a class as follows:
class Child : MyInterface {
override fun bar() {
print("bar() was called")
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents