Pebellslearn by building
RoadmapsMatrixCoursesSandboxSign in

Course details

Kotlin

Learn the core of Kotlin, the concise language behind modern Android and a growing share of server code. You will set up a project, store values in well-chosen types, work with lists, sets and maps, and steer a program with if, when and loops — all while building one small café order app.

Ready to learn5 sections · 23 lessons
Start learning

Course curriculum

Introduction to Kotlin5 lessons

Meet Kotlin: its short history, the problems it was designed to solve, and how it lives side by side with Java. Then set up a working environment, learn how files and packages are organised, and write the main function every program starts from.

  1. Where Kotlin Came From and Why Use It12 min
  2. Java Interoperability12 min
  3. Setting up the Environment12 min
  4. Packages, Files and Imports12 min
  5. The main Function12 min
Variables and Data Types5 lessons

Decide when a value may change with val and var, let the compiler infer types, pick between whole numbers, decimals and unsigned numbers, work with characters, strings and booleans, and check or convert types safely.

  1. val vs var12 min
  2. Type Inference12 min
  3. Integers, Floats and Unsigned Numbers15 min
  4. Characters, Strings and Booleans12 min
  5. Type Checks and Casts15 min
Comments and Printing Data3 lessons

Write comments that explain why, not what, including KDoc for documentation. Then print output with print and println and build readable messages with string templates.

  1. Comments12 min
  2. print and println12 min
  3. String Templates12 min
Collections, Ranges and Sequences5 lessons

Store the café's menu, prices and orders in arrays, lists, sets and maps, understand what read-only really means, count with ranges and progressions, and step through data with iterators and lazy sequences.

  1. Arrays and Lists15 min
  2. Sets and Maps15 min
  3. Read-only vs Mutable Collections12 min
  4. Ranges and Progressions12 min
  5. Iterators and Sequences15 min
Conditional Expressions and Loops5 lessons

Choose between values with if and when, which in Kotlin are expressions that return a result. Then repeat work with for and while loops, and control them precisely with break, continue and labels.

  1. if as an Expression12 min
  2. when Expressions15 min
  3. for Loops12 min
  4. while and do-while12 min
  5. break, continue and Labels15 min