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