ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is the primary purpose of the companion object in Kotlin?
Correct Answer: D — To provide a static-like context within a class
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.