Const val
If the value of a read-only property is known at the compile time, mark it as a compile time constant using the const
modifier. Such properties need to fulfil the following requirements:
- Top-level, or member of an
object declaration
or acompanion object
. - Initialized with a value of type
String
or a primitive type - No custom getter
Links
https://kotlinlang.org/docs/reference/properties.html