Kotlin - Variables and Type System
What will be the output of this Kotlin code?
var flag: Boolean = false flag = true println(flag)
var flag: Boolean = false flag = true println(flag)
flag is declared with var, so it can be reassigned. Initially false, then set to true.flag holds true, so printing it outputs "true".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions