Kotlin Fundamentals

Kotlin Fundamentals

A modern, null-safe JVM language -- from val/var and null safety through data classes, interfaces, collections, and an introduction to coroutines.

beginner12 lessons4 modules6h total

Who it's for

Learners with some prior programming experience (Java or otherwise) who want a practical introduction to Kotlin for Android or backend development.

What you'll be able to do

  • Read and predict the behavior of real Kotlin programs covering null safety, data classes, and collections
  • Explain why Kotlin classes are final by default and how nullable types prevent a whole class of runtime errors
  • Describe how Kotlin interoperates with Java and where it's used today (Android, Ktor, Spring)

Not started — 12 lessons, no account required.

Start this course

Practice this course →Add to a study plan →Interview questions

Getting Started with Kotlin

The JVM relationship, val vs var, and control flow.

  1. Introduction to Kotlin and the JVM

    What Kotlin is, its relationship to Java and the JVM, and where it's used.

    15 min
  2. val vs var and Basic Types

    Kotlin's read-only val, mutable var, and basic types with type inference.

    15 min
  3. Control Flow: if as an Expression, when, and for

    Kotlin's if-as-expression, the powerful when construct, and for loops.

    18 min

Null Safety & Functions

Null safety, and functions with default arguments and lambdas.

  1. Null Safety

    Kotlin's signature feature: nullable types, safe calls, and the Elvis operator.

    20 min
  2. Functions, Default Arguments, and Lambdas

    Function declarations, default/named arguments, and higher-order functions with lambdas.

    20 min

Classes & Data Classes

Primary constructors, data classes, and interfaces/inheritance.

  1. Classes and Primary Constructors

    Kotlin's concise primary constructor syntax and class property declarations.

    18 min
  2. Data Classes

    Kotlin's data class: automatic equals, hashCode, toString, and copy.

    15 min
  3. Interfaces and Inheritance

    Kotlin's interfaces, and why classes are final unless marked open.

    18 min

Collections, Coroutines & Interop

Collections, coroutines fundamentals, Java interop, and a wrap-up design lesson.

  1. Collections: List, Map, and Functional Operations

    Kotlin's List and Map, plus common functional operations like filter and map.

    18 min
  2. Coroutines Fundamentals

    An introduction to Kotlin's suspend functions and coroutines for asynchronous code.

    20 min
  3. Java Interop and Where Kotlin Is Used Today

    How Kotlin and Java code call each other, and Kotlin's real-world usage today.

    15 min
  4. Putting It Together: Designing a Small Kotlin Data Model

    A wrap-up lesson combining data classes, null safety, and collections into one design.

    20 min