Basic types
In Kotlin, everything is an object in the sense that you can call member functions and properties on any variable. While certain types have an optimized internal representation as primitive values at runtime (such as numbers, characters, booleans and others), they appear and behave like regular classes to you.
This section describes the basic types used in Kotlin:
To learn about other Kotlin types, such as Nothing
, Any
, and Unit
, look through the Kotlin API reference:
Last modified: 25 September 2024