
Android & Kotlin30 sec read
Kotlin Functions: Named, Reusable Code Blocks
A function is a named recipe for your code. You give it ingredients (parameters) and it produces a result. They are used everywhere, from calculating values to handling button clicks.

Android & Kotlin31 sec read
Kotlin Null Safety: Catch Nulls at Compile Time
Kotlin's type system catches null pointer errors at compile time. Variables are non-nullable by default; you must opt-in to nulls with a `?` (e.g., `String?`). The compiler then forces you to handle the null case. The main footgun is the `!!` operator.

Android & Kotlin30 sec read
Kotlin Variables: `val` for Constants, `var` for Variables
In Kotlin, `val` creates a read-only constant you assign once, like a fixed setting. `var` creates a mutable variable you can change later. Always prefer `val` unless you explicitly need to reassign a value to prevent accidental state changes.