Module 05 of 12

Classes & OOP

Lessons

About This Module

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.

Lessons

4 videos
01

Kotlin For Beginners Tutorial (Classes, Attributes, Functions, Constructors, Init Block)

Shows how to create your own class and use it in an application, including the different types of constructors and the init block.

02

Constructors and Init Blocks in Kotlin - Best Practices

Explains how to instantiate objects using constructors and the init block, with best practices for each.

03

Unlocking Kotlin: Dive into Classes, Interfaces & Inheritance

Explores object-oriented programming in Kotlin: classes, interfaces, and inheritance, compared with Java.

04

Kotlin Interface Tutorial with Example - Kotlin Multiple Inheritance

Covers what a Kotlin interface is, how it differs from an abstract class, and how to inherit multiple interfaces.