A

Admin • 802.91K Points
Coach

Q. What is 'data class' used for in Kotlin?

  • (A) Database connection
  • (B) To create classes with default toString, equals, and hashCode
  • (C) To perform data transfer
  • (D) To store JSON data
  • Correct Answer - Option(B)
  • Views: 2
  • Filed under category Kotlin
  • Hashtags:

Explanation by: Admin
data class in Kotlin automatically generates equals(), hashCode(), and toString().

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.