Kotlin - Data Types
What will be the output of the following Kotlin code?
val x: Double = 9.99 val y: Int = x.toInt() println(y)
val x: Double = 9.99 val y: Int = x.toInt() println(y)
toInt() function converts a Double to Int by dropping the decimal part, not rounding.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions