Member-only story

Kotlin Cheat Sheet for Android Developers 🚀

Android Dev Nexus
8 min readSep 27, 2024

Developers Assemble! 🗿

Hello you genius developers, welcome to yet another part of our ongoing Kotlin series where we’ll be covering the essentials you’ll use daily to create fantastic apps 🤗

Let’s explore the cheat sheet, then!

🌟Members can scroll down to enjoy! Non-members, click here for full access.🌟

1. val vs var 🤧

  • val: Immutable reference (like final in Java). You cannot reassign a value once assigned.
  • var: Mutable reference. The value can change during runtime.

2. lateinit ⏰

  • What: Allows initializing a non-null variable later, typically for dependency injection or unit testing.
  • Why: Used when you cannot initialize a variable at the time of declaration, often for classes or Android views.
  • Use case: Fragment fields injected by frameworks.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Android Dev Nexus
Android Dev Nexus

Written by Android Dev Nexus

Your friendly neighborhood developers working at PayPal, turning Android fundamentals into concepts you’ll actually understand.

Responses (4)

Write a response

This one is really good with all the important concepts. Can you please share a one for advanced concepts like coroutines?

Much needed cheatsheet. Thank you 😊

Ah, I gotta use this for my next interview