Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Why do we need write open before class name in Kotlin while working on inheritance?



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

Post New Answer

More Kotlin Interview Questions

Which companies use kotlin?

1 Answers  


How to declare a variable in kotlin?

1 Answers  


How to write string template expression?

1 Answers  


How are Primary Constructors different from Secondary Constructors ?

1 Answers  


What is the role of matches() method in regular expression?

1 Answers  


Differentiate between generics in and out in Kotlin?

1 Answers  


Explain the Main features of kotlin which are not available in java?

1 Answers  


List down some kotlin data class built in methods?

1 Answers  


Which method is used to get array last index?

1 Answers  


What is the difference between Return Type Unit and Return Type Nothing in Kotlin?

1 Answers  


List of extension methods kotlin provides to java.io.file?

1 Answers  


What is a const? How does it differ from a val?

1 Answers  


Categories