May 2024
Intermediate to advanced
560 pages
16h 9m
English
This chapter covers
Kotlin has a number of features where specific language constructs are implemented by calling functions that you define in your own code. You already may be familiar with these types of constructs from Java, where objects that implement the java.lang.Iterable interface can be used in for loops and objects that implement the java.lang.AutoCloseable interface can be used in try-with-resources statements.
In Kotlin, such features are tied to functions with specific names (and not bound to some special interfaces in the standard library, like they are in Java). For example, ...
Read now
Unlock full access