In the same way as any other modern language, Kotlin uses variables or data types, which are among the most important features in programming. These variables are created to handle different types of data, including numbers, letters, words, and so on. Variables are allocated locations in memory for storing all kinds of data.
The data types in Kotlin are as follows:
- Byte
- Short
- Integer
- Long
- Float
- Double
- Character
- Boolean