Android is known for its dreaded NullPointerExceptions. In this video, learn how Kotlin helps to address this issue. Look at the type system, named parameters, default values, and more.
- [Instructor] The introduction of null…into programing languages has been called…the billion dollar mistake.…This is becuase it has led to endless errors and crashes…over the past several decades.…Kotlin's type system aims to address this issue…by putting null ability front and center.…The Kotlin compiler enforces…that variables that cannot hold null values…will cause a compilation error…if you attempt to set them to null.…Just like what we see here.…
Conversely, if you explicitly declare…that the variable can be nullable, you're good to go.…This can prevent you from experiencing…the dreaded null pointer exceptions…that Android is notoriously known for.…Kotlin also helps with readability in your Android code.…Android tends to make liberal use of callbacks or listeners.…Here's an example of setting a ClickListener…on a FloatingActionButton in Java.…And here it is again in Kotlin.…
Much more concise, and easier to read.…Another very common issue on Android…is having methods with too many parameters,…often of the same type.…
- What Kotlin has to offer
- Working with lambdas
- Common Android extension functions
- Kotlin Android Extensions overview
- Making use of the Anko library
- Working with coroutines
- Nullability and collections
Skill Level Intermediate
Android App Development: Data Persistence Librarieswith Annyce Davis3h 59m Intermediate
Developing AWS Lambda Functions with Kotlinwith Troy Miles1h 55m Intermediate
1. Kotlin Overview
2. Extension Functions and Properties
3. Incorporating Anko
4. Advanced Anko
5. Working with Collections
- 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.