class AlbumOrderType { companion object { const val OLDEST_FIRST = 1 const val NEWEST_FIRST = 2 }}val type = AlbumOrderType.OLDEST_FIRST
If you plan to use the code in Java
class AlbumOrderType { companion object { @JvmStatic val OLDEST_FIRST = 1 @JvmStatic val NEWEST_FIRST = 2 }}
If you are using singleton object declaration.
object App { const val APP_NAME = "Hello"}val name = App.APP_NAME