You've previously learned how to convert some of your Java classes to Kotlin, the new programming language from JetBrains that’s now fully supported in Android. In this tip learn how to replace plain old Java object, or POJO classes, with what Kotlin calls data classes: that is, classes that are simply used to store data in memory.
- [Instructor] In a previous tip, I've described how to…convert some of your Java classes to Kotlin,…the new programming language from JetBrains…that's now fully supported in Android.…In this tip, I'll show you how to replace plain old…Java object, or POJO classes, with what Kotlin calls…data classes.…That is, classes that are simply used to store data…in memory.…Now I'm working in Android Studio 2.3.…If you're working in Android Studio 3 or later,…some of these steps might look a little bit different,…but you'll still be using the same language…and that's the focus of this tip.…
In my project, I'm going to create a new package.…I'll place this under the base package,…and I'll name it Model.…Than I'll right-click on the new package and select New,…Kotlin File or Class.…I'll name my class Person,…and I'll set the kind of file I'm creating to Class,…and click OK.…Now I'll add this to Git so I can check it in easily,…and I see a prompt that tells me that Kotlin…isn't configured.…Now this is the part that may look different on your system…
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.