Introduction
In Kotlin, a statically typed language, the ‘type’ of your variables must be known at compile-time. This is opposed to dynamically typed language, where the ‘type’ is determined at run-time. This characteristic is a fundamental aspect of the language that greatly influences how you write and understand Kotlin code.
Data types are the classification of types of data stored in a variable, which determines the possible values and operations that can be performed. The data type is used for the declaration of the memory location of the variable.
In Kotlin, everything is an object. Hence, you can call member functions and properties on any variable. Don’t worry if you aren’t familiar with objects, functions, or properties, you’ll learn about them in future chapters.
Mastering the different data types available in a programming language is a crucial step toward proficiency. In this lesson, you’ll learn about the different types available in Kotlin, from numbers and characters to arrays and strings.
You’ll explore how to work with each of these types and how they form the building blocks of your Kotlin programs. You’ll then learn how Kotlin makes your life easier with its handy Type Inference feature.