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:
- Numbers and their unsigned counterparts
- Booleans
- Characters
- Strings
- Arrays
{type="tip"}
To learn about other Kotlin types, such as Nothing
, Any
, and Unit
, look through the Kotlin API reference: