Answers for "best way to declare constant in kotlin"

1

kotlin global constants

const val PRESENTATION_MODE_PRESENTING = "presenting"
const val PRESENTATION_MODE_EDITING = "editing"

object DbConstants {
  const val PRESENTATION_MODE_PRESENTING = "presenting"
  const val PRESENTATION_MODE_EDITING = "editing"
}
Posted by: Guest on April-20-2021
0

kotlin constante

const val SERVER_URL: String = "https://my.api.com"
Posted by: Guest on December-06-2021
0

What is a const in Kotlin

const in Kotlin is like final static in Java
Posted by: Guest on October-19-2021

Code answers related to "best way to declare constant in kotlin"

Browse Popular Code Answers by Language