Hard Prerequisites |
IMPORTANT: Please review these prerequisites, they include important information that will help you with this content. |
|
An interface is defined using the keyword interface
interface MyInterface {
fun bar()
fun foo() {
// optional body
}
}
A class or object can implement one or more interfaces
class Child : MyInterface {
override fun bar() {
// body
}
}