Kotlin is a fully object-oriented language, and its class syntax is much more compact than Java's. You'll learn how to declare a class, create objects, and define properties and methods. You'll also set up objects with the primary constructor, secondary constructors, and init blocks.
The module then covers how classes relate to each other: inheritance with open classes and overrides, abstract classes, and interfaces, including the differences between abstract classes and interfaces and when to use each.
Watch the lessons in order, then continue on to Data & Sealed Classes.
Shows how to create your own class and use it in an application, including the different types of constructors and the init block.
Explains how to instantiate objects using constructors and the init block, with best practices for each.
Explores object-oriented programming in Kotlin: classes, interfaces, and inheritance, compared with Java.
Covers what a Kotlin interface is, how it differs from an abstract class, and how to inherit multiple interfaces.