October 2019
Intermediate to advanced
434 pages
11h 54m
English
So far, we've seen examples that use a primary constructor to initialize a class in Kotlin. While primary constructors are an easy way to instantiate a class, they aren't the only option. There are multiple ways of handling the construction of a class. Through the use of primary constructors, secondary constructors, and various visibility modifiers, Kotlin provides a great deal of freedom in how we choose to instantiate classes, and we'll take a look at those in the following sections.
Read now
Unlock full access