Kotlin Full Course
Kotlin learning repository covering syntax, types, control flow, null safety, classes, OOP, coroutines, and Android preparation — structured as a comprehensive reference.
Structured Kotlin learning material — built as a personal reference and preparation for Android development (IN2000). Covers the language from the ground up rather than skipping to Android APIs.
Topics covered
Language fundamentals
- Variables:
valvsvar, type inference, explicit type annotations - Primitive types and their Kotlin equivalents (
Int,Long,Double,Boolean,String) - String templates and multi-line strings
- Operators: arithmetic, comparison, logical, bitwise
Control flow
if/elseas expressions (Kotlinifreturns a value)whenas a powerfulswitchreplacement — matching on types, ranges, and conditionsforloops with ranges (1..10,until,downTo,step)whileanddo-while
Functions
- Named functions, default parameters, named arguments
- Extension functions — adding methods to existing types without inheritance
- Higher-order functions and lambdas
- Inline functions and
crossinline/noinlinemodifiers
Null safety
- The nullable type system (
String?vsString) - Safe calls (
?.), Elvis operator (?:), non-null assertions (!!) let,run,apply,also,with— scope functions and when to use each
Object-Oriented Programming
class,data class,sealed class,object(singleton),companion object- Inheritance,
open/final, interfaces vs abstract classes - Property delegation and
lazy
Coroutines
suspendfunctions and coroutine scopeslaunchvsasync/awaitDispatchers.MainvsDispatchers.IOvsDispatchers.Default- Structured concurrency and cancellation
Collections
List,Set,Map— mutable vs immutable variants- Functional collection operations:
map,filter,reduce,fold,groupBy,sortedBy
Why a dedicated Kotlin course
Coming from Java, Kotlin’s null safety alone removes a large category of bugs. The coroutines section in particular is essential for Android — understanding structured concurrency made the Android app work (IN2000) much easier to reason about.