So far in this book, we have learned about different types of classes, including normal and abstract classes. The main purpose of writing classes is to allow other classes to extend each other and to take full advantage of code reusability and maintainability. These classes can be called and used in any part of the application. For example, if class A is declared in the File1.kt file and class B is declared in the File2.kt file, then class B or any other class can extend class A. This is a normal practice and is referred to as inheritance. However, Kotlin provides another type of class that is restricted to limited classes and cannot be further inherited. These classes are called sealed classes.
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine