‫In Kotlin, data types are classifications that specify which type of data can be stored in a variable.
‫They define the kind of values a variable can hold and the operations that can be performed on those
‫values.
‫In Kotlin, data types can be categorized into two main groups primitive data types and non primitive
‫data types.
‫Primitive data types, also known as basic data types or value types, are the fundamental building
‫blocks for representing simple data.
‫They directly represent values and have a fixed size in memory.
‫In Kotlin, primitive data type includes integers, float, car, and Boolean.
‫Integers represent whole numbers.
‫The common integer types in Kotlin are in short, long, and byte.
‫The second primitive type is the float.
‫Floating point numbers.
‫These represent numbers with decimal points.
‫The common floating point types in Kotlin are double and float.
‫The third type is characters.
‫These represent single characters, such as letters or symbols.
‫The card type is used for character data.
‫Booleans.
‫These represent true or false values.
‫The Boolean type is used for Boolean data.
‫Non primitive data types, also known as reference types, are more complex data structures that don't
‫directly represent values, but instead hold references to objects or data structures in Kotlin.
‫Non primitive data types include.
‫Strings.
‫The string type represents sequences of characters.
‫Custom classes.
‫You can define your own custom classes to create complex data structures combining primitive and non
‫primitive types.
‫Arrays, which are a data structure used to store a collection of elements of the same data type.
‫Also we have collections, nullable types and so on as non primitive data types.
‫So let's start learning about these primitive and non primitive data types.