Sobes.tech
Junior — Middle

Can you list the basic data types used in Kotlin?

sobes.tech AI

Answer from AI

In Kotlin, the basic data types include:

  • Int — integer type (32-bit)
  • Long — long integer (64-bit)
  • Short — short integer (16-bit)
  • Byte — byte (8-bit integer)
  • Double — double-precision floating-point number
  • Float — single-precision floating-point number
  • Boolean — logical type (true/false)
  • Char — character

Example usage:

val number: Int = 42
val flag: Boolean = true
val letter: Char = 'A'
Can you list the basic data types used in Kotlin… - sobes.tech