Basics the open keyword

suggest change

In Kotlin, classes are final by default which means they cannot be inherited from.

To allow inheritance on a class, use the open keyword.

open class Thing {
    // I can now be extended!
}
Note: abstract classes, sealed classes and interfaces will be open by default.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents