September 2019
Intermediate to advanced
462 pages
11h 3m
English
Classes are more like social creatures than hermits. Classes relate to and build on top of the abstractions defined in other classes. To build complex applications, it should be easy to create hierarchies of abstractions. Kotlin does that well—you can create interfaces, define nested and inner classes, and also use inheritance.
Being a statically typed language, Kotlin promotes design by contract, where interfaces serve as specifications and classes as implementors of those contracts. You can also reuse implementations, in addition to specifications, by creating abstract classes.
From the safety point of view, classes are final by default and you have to explicitly annotate them as open to serve ...
Read now
Unlock full access