Loading practice questions
What is the primary purpose of the companion object in Kotlin?
Correct Answer: D — To provide a static-like context within a class
Explanation:
A companion object in Kotlin acts like a static context, allowing you to define methods and properties that belong to the class itself rather than its instances.