July 2018
Intermediate to advanced
400 pages
12h 14m
English
You have seen variables that are of the String type and variables of the Int type. Kotlin also has types to handle values like true/false, lists of elements, and key-value pairs for defining mappings of elements. Table 2.1 shows many of the commonly used built-in types available in Kotlin:
Table 2.1 Commonly used built-in types
| Type | Description | Examples |
|---|---|---|
String
|
Textual data |
|
Char
|
Single character |
Unicode character U+0041 |
Boolean
|
True/false values |
true false |
Int
|
Whole numbers |
|
Double
|
Decimal numbers |
|
List
|
Collections of elements |
|
Set
|
Collections ... |
Read now
Unlock full access