2

Diving into Kotlin

When you catch a glimpse of your potential, that’s when passion is born.

Zig Ziglar

In this chapter, you’ll familiarize yourself with the syntax, features, and underlying concepts of the Kotlin programming language. Apart from basics like data types and control flow, you’ll learn how to avoid null in Kotlin, how to create different types of functions, how to check for equality of two variables, and how to handle exceptions.

Kotlin REPL

To try out simple code snippets, Kotlin provides a read-eval-print-loop (REPL). The REPL evaluates a given piece of code directly and prints its result. This is useful to quickly try out how to use a language feature or a third-party library or to share code snippets with colleagues. Thus, ...

Get Kotlin for Android App Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.