# Data classes aren't (that) magical

DevFeed: [Data classes aren't (that) magical](<https://devfeed.tech/articles/data-classes-aren-t-that-magical-27059.md>)

Original publisher: [Read original article](<https://zsmb.co/data-classes-arent-that-magical/>)

Author: Márton Braun

Published: 2019-01-16T16:00:00Z

Content type: tutorial

Language: en

Sources: [zsmb.co](<https://devfeed.tech/sources/zsmb-co.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [Java](<https://devfeed.tech/topics/java.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [classes](<https://devfeed.tech/tags/classes.md>), [constructor](<https://devfeed.tech/tags/constructor.md>), [create](<https://devfeed.tech/tags/create.md>), [data-class](<https://devfeed.tech/tags/data-class.md>), [destructuring](<https://devfeed.tech/tags/destructuring.md>), [generate](<https://devfeed.tech/tags/generate.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [marton-braun](<https://devfeed.tech/tags/marton-braun.md>), [optional](<https://devfeed.tech/tags/optional.md>), [parameter](<https://devfeed.tech/tags/parameter.md>), [properties](<https://devfeed.tech/tags/properties.md>), [zsmb](<https://devfeed.tech/tags/zsmb.md>), [zsmb-co](<https://devfeed.tech/tags/zsmb-co.md>), [zsmb13](<https://devfeed.tech/tags/zsmb13.md>), [zsmbco](<https://devfeed.tech/tags/zsmbco.md>)

## AI overview

This tutorial explains what Kotlin data classes add to regular classes. It covers generated methods, how primary-constructor properties affect those methods, destructuring support, and the copy method with optional named parameters.

## Source excerpt

Data classes are great, but don't underestimate what a regular Kotlin class can do on its own.