Kotlin gives you many ways of managing class data in memory. Just like in Java, you can create classes designed to hold one instance of a particular type. In Kotlin these are called Data classes.
- [Instructor] Kotlin gives you many ways…of managing data in memory.…Just like in Java, you can create classes…designed to hold one instance of…a particular type.…In Kotlin, these are called Data Classes.…And within those Data Classes, you can have…properties representing values,…and when a property can have one of a…finite number of possible values,…you can represent those values…with something called an Enum class.…I'll start in this demonstration by creating…a new Kotlin class.…And I'll put it in my base package.…
I'll select New Kotlin File or Class,…and I'll call this Clothing Item.…And I'll set its kind as Class,…and I'll create it.…Now, the clothing item is going to…have a clothing type.…I'll declare the various possible values…for the clothing type using an Enum class.…And I'll create this as a nested class…within the Clothing Item class.…I'll name this Clothing Type…and I'll assign three possible values.…
These are kind of like constants,…so I use upper case characters to represent them.…The possible values will be Shirt, Shoes, and Hat.…
Skill Level Intermediate
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.
Android App Development: Data Persistence Librarieswith Annyce Davis4h 52m Intermediate
Building Android Apps with Cloud Serviceswith Albert Lo2h 37m Intermediate
1. Android Development Tips Weekly
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.