In Kotlin, use val to declare a constant or var keywords to declare a variable . You can specify a type such as String or Int after the variable name. In the example below, we declared a constant firstName of type String with the val keyword.
In Kotlin, use val to declare a constant or var keywords to declare a variable . You can specify a type such as String or Int after the variable name. In the example below, we declared a constant firstName of type String with the val keyword.