Kotlin - Variables and Type System
Identify the error in this Kotlin code:
fun main() {
const val MAX = 100
println(MAX)
}fun main() {
const val MAX = 100
println(MAX)
}const val MAX is declared inside a function, which is not allowed.const val cannot be declared inside a function -> Option B15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions