Kotlin & Coroutines (50 Qs)•Part 3: K2 Compiler, KMP, Advanced Metaprogramming & Optimization (25 - 35)
How does Const Val differ from Val in Kotlin?
senior LevelPerformance
In Simple Words:
const val: Compile-time constant inlined directly at bytecode call sites; must be primitive or String at top-level/object.val: Runtime immutable reference; can be assigned from function calls.