Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Types in Kotlin
// Kotlin Numeric Types Examples
val myByte: Byte = 10
val myShort: Short = 125
val myInt = 3000
val myLong = 3000L // The suffix 'L' is used to specify a long value
val myFloat = 123.45f // The suffix 'f' or 'F' represents a Float
val myDouble = 321.05
val hundredThousand = 100_000
val oneMillion = 1_000_000
val aTrueValue = true
val letterChar = 'K'
val digitChar = '1'
var basicKotlin = "Basic Kotlin"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment