Kotlin - Variables and Type System
Identify the error in this Kotlin code snippet:
val count = 5
println("Count is $count+1")val count = 5
println("Count is $count+1")$count as variable and +1 as plain text, so it prints "5+1" literally.${count + 1} to evaluate the sum inside the string.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions