Chapter 2. Kotlin Basics
It's time to discover the fundamental building blocks in Kotlin. For those coming from a Java background, this chapter will highlight some of the key similarities and differences between Kotlin and Java, and how Kotlin's language features compare to those in Java and on the JVM. For those who are not Java programmers, these differences can be safely skipped.
In this chapter we will cover the following topics:
- Variables and values
- Control flow and expressions
- Type inference
- Smart casting
- Basic types and the Kotlin type hierarchy