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
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand