Kotlin Constants
const val declares a compile time constant at top level or in an object. It must be a primitive or String.
Example
const val MAX = 100
const val APP = "JTS"
fun main() { println("$APP $MAX") }Exercise
Declare a compile time constant.
val MAX = 1Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.