YuNing's Thought

Home

❯

Notes

❯

Kotlin Data Class

Kotlin Data Class

Dec 30, 20251 min read

Data Class

  • equals()/hashCode() pair.
  • toString() of the form "User(name=John, age=42)".
  • componentN() functions corresponding to the properties in their order of declaration.
  • copy() function (see below).
  • Data classes | Kotlin Documentation

Graph View

Backlinks

  • Kotlin Class

Created with Quartz v4.5.2 © 2025

  • GitHub
  • Discord Community