ObjectiveMcq
Print Protected
This page is protected for print. Use the website to view the content.
What is a data class in Kotlin used for?
Correct Answer: C — To hold data without boilerplate code
A data class in Kotlin is designed to hold data. It automatically provides methods like toString(), equals(), hashCode(), and copy(), reducing boilerplate code.