O'Reilly logo

Kotlin in Action by Svetlana Isakova, Dmitry Jemerov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. The Kotlin type system

This chapter covers

  • Nullable types and syntax for dealing with nulls
  • Primitive types and their correspondence to the Java types
  • Kotlin collections and their relationship to Java

By now, you’ve seen a large part of Kotlin’s syntax in action. You’ve moved beyond creating Java-equivalent code in Kotlin and are ready to enjoy some of Kotlin’s productivity features that can make your code more compact and readable.

Let’s slow down a bit and take a closer look at one of the most important parts of Kotlin: its type system. Compared to Java, Kotlin’s type system introduces several new features that are essential for improving the reliability of your code, such as support for nullable types and read-only collections ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required