For a Java developer wanting to migrate to Kotlin, this chapter ended up reviewing well-known concepts. Regardless of whether you have programmed in an OOP language before or not, you now know the key concepts of this software design approach, and you can write code that is object-orientated, using the new features available in Kotlin, and make it more structured and readable. I cannot overemphasize how important it is to favor composition over inheritance. There is no standard recipe for getting it right. Your goal should always be to keep things simple, and you should do the same when building a class hierarchy.
In the Chapter 4, Functions in Kotlin, you will get an in-depth view of functions in Kotlin. You will see how the language has borrowed from C# extension methods—special methods that allow you to add new functionality to existing classes.
...