Data classes

Data classes are used to hold data. They’re marked with the data keyword to tell the compiler that we’re creating this class to hold data so that it can automatically create the necessary functions to handle and process data.

Get hands-on with 1400+ tech skills courses.