June 2018
Intermediate to advanced
316 pages
6h 34m
English
Kotlin is a more object-oriented language than Java because Kotlin doesn't have primitive types, static fields, or static functions. But it's not a secret that these can improve performance. In this section and the next section, we'll look at examples that will help you understand some nuances of Kotlin related to primitive types, static fields, and static functions.
A compile-time constant is a read-only variable that's initialized during compilation. It has to meet the following requirements:
Let's look at the following example:
const val compileTime: Int = ...
Read now
Unlock full access