Kotlin doesn't have a static keyword like Java does. Kotlin idioms rely on concepts such as top-level functions and properties, extension functions, and compile-time constants to achieve the same functionality without the need for an explicit static keyword. If you're working strictly within a Kotlin code base, this doesn't pose much of a problem, but if you're working across both Java and Kotlin, there may be times when you want to expose properties or methods as static so they can be used more naturally from Java. In this section, we'll learn how to expose Kotlin elements as true JVM static elements so they can be used more naturally from Java.
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