Kotlin - Data Types
Identify the error in this Kotlin code snippet and choose the correct fix:
val a: Int = 5 val b: Double = a println(b)
val a: Int = 5 val b: Double = a println(b)
val b: Double = a causes a compilation error.a.toDouble() explicitly converts Int to Double, fixing the error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions