Part 2: Language Basics

Learn Kotlin’s core syntax: values, types, null safety, control flow, and functions.

What You’ll Learn

  • val vs var, basic types, and type inference
  • Strings and string templates
  • Kotlin’s null safety: ?., ?:, !!, and let
  • Operators, if/when expressions, loops, and ranges
  • Declaring functions with default and named arguments

Chapters

Chapter Description
Variables & Types val/var, basic types, inference
Strings String templates and multiline strings
Null Safety Nullable types, safe calls, Elvis, !!
Control Flow if/when expressions, loops, ranges
Functions Parameters, default/named args, single-expression

Table of contents


Back to top

Kotlin & Android Programming Guide is not affiliated with JetBrains or Google. Content is provided for educational purposes.

This site uses Just the Docs, a documentation theme for Jekyll.