Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlincompanion object as a JVM classSingle-choice MCQ

A `const val` and a regular `val` in a companion object are accessed from Java very differently. What is the underlying bytecode reason?

class Cfg { companion object { const val MAX = 10 val name = "n" } }