Why do we need write open before class name in Kotlin while working on inheritance?
Answer / Kumar Vivekanand Vivek
In Kotlin, the `open` keyword is used to declare a class as open for inheritance. By default, classes in Kotlin are final and cannot be inherited from. When you use `open`, it allows other classes to extend the current one.
| Is This Answer Correct ? | 0 Yes | 0 No |
Which companies use kotlin?
How to declare a variable in kotlin?
How to write string template expression?
How are Primary Constructors different from Secondary Constructors ?
What is the role of matches() method in regular expression?
Differentiate between generics in and out in Kotlin?
Explain the Main features of kotlin which are not available in java?
List down some kotlin data class built in methods?
Which method is used to get array last index?
What is the difference between Return Type Unit and Return Type Nothing in Kotlin?
List of extension methods kotlin provides to java.io.file?
What is a const? How does it differ from a val?