Browse topics
Kotlin Basics
Kotlin Data Types
Explore Int, Float, Double, Char, Boolean, String and more, with type conversion.
Kotlin Data TypesBoolean Data type Usage and Type Conversion in KotlinBoolean data type represents only two values.Either true or false. A Kotlin example with source code and sample output.Kotlin Data TypesByte Data type Usage and Type Conversion in KotlinA byte is an 8-bit number in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesChar Data type Usage and Type Conversion in KotlinChar data type is represented by single apostrophe just like Java in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesDouble Data type Usage and Type Conversion in KotlinDouble is a 64-bit number in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesPage not foundPage not found - example program with explanation, syntax, and sample output.Kotlin Data TypesFloat Data type Usage and Type Conversion in KotlinA float is a 32-bit number in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesInt Data type Usage and Type Conversion in KotlinInt is a 32-bit number in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesLong Data type Usage and Type Conversion in KotlinA Kotlin example program demonstrating Long Data type Usage and Type Conversion, complete with the source code and expected sample output.Kotlin Data TypesNumber Data type Usage and Type Conversion in KotlinThere are 6 built-in types of numbers in Kotlin. A Kotlin example with source code and sample output.Kotlin Data TypesShort Data type Usage and Type Conversion in KotlinShort is a 16-bit number in Kotlin The type is to be declared explicitly. A Kotlin example with source code and sample output.Kotlin Data TypesString Data type Usage and Type Conversion in KotlinString Data type Usage and Type Conversion in Kotlin: a complete example program with source code and sample output, explained step by step.
Related topics
Basic Programs Get started with Kotlin: your first program, variables, and comments. Kotlin Operators Arithmetic, relational, logical, assignment and Kotlin's special operators. Conditional Statements Control program flow with if, when, break, continue and return. Kotlin Input and Output Read input and print output in Kotlin, including the Scanner class. Looping & Controls Repeat work with for, while, do-while and the repeat function. Kotlin Functions Define functions with default, named and vararg parameters, single-expression, local, tailrec and infix functions.