Introduction

Learn a few facts about Kotlin that make Kotlin alluring for Java professionals.

About the course

Kotlin Compact is for all Java professionals who want to get into Kotlin development with minimal time and effort.

In compact chapters that concentrate on the essentials, you’ll get to know Kotlin within a few afternoons or some subway rides, and will soon be able to use it to write your own programs and applications.

As the title suggests, Kotlin Compact is not explicitly an all-encompassing work on Kotlin. Rather, we focus on the necessary foundations and the most valuable features Kotlin has to offer when getting started with Kotlin development.

Quick facts about Kotlin

  • In Kotlin, ; is not mandatory.
  • Kotlin is null-safe.
  • Kotlin offers 100% java interoperabilityjavainteroperability.
  • Kotlin is strongly typed.
  • Kotlin knows/needs no primitives.
  • Kotlin classes have properties and not just simple fields.
  • Kotlin offers data classes with automatically-generated equals/hashCode methods.
  • Kotlin functions support default values ​​for parameters.
  • In Kotlin, function arguments can alternatively be referenced by name.
  • Kotlin only knows runtime exceptions but not checked exceptions.
  • Kotlin has no new keyword.
  • Kotlin supports operator overloading.
  • Kotlin offers string interpolation: println("Hello $userName! You have ${inbox.size} new messages.").
  • Kotlin distinguishes between mutableMutable and immutableimmutable collections.
  • Kotlin can be compiled not only to JVM bytecode but also to JavaScript.
  • Kotlin is fully compatible with Java 6, which is particularly interesting for Android developers who also want to reach users who don’t use the latest mobile devices.
  • Kotlin is lead by JetBrains—the company behind IntelliJ IDEA.

  • Kotlin is an officially supported language for Android development.
  • Kotlin offers coroutines as an alternative to blocking multithreading.
  • Kotlin is open source and released under the Apache License 2.0.