Sling Academy
Home/Kotlin/Kotlin Object-Oriented Programming

Kotlin Object-Oriented Programming

In this series of tutorials, you will learn:

  • Classes and Objects
    • Constructors and object creation.
  • Inheritance and Interfaces
  • Data Classes
  • Sealed Classes
  • Encapsulation
    • Properties, getters, and setters.

1 Introduction to Object-Oriented Programming in Kotlin

2 Defining Classes in Kotlin: The Basics

3 Understanding Objects in Kotlin: How to Create and Use Them

4 Primary and Secondary Constructors in Kotlin

5 How to Initialize Objects with Custom Constructors in Kotlin

6 Creating Objects Without a Class Using `object` in Kotlin

7 Exploring `init` Blocks for Class Initialization in Kotlin

8 What is Inheritance? Understanding the Basics in Kotlin

9 How to Extend a Class in Kotlin Using `open`

10 Overriding Methods and Properties in Kotlin

11 Kotlin: Using the `super` Keyword to Access Parent Class Members

12 Understanding Polymorphism in Kotlin: Compile-Time and Runtime

13 How to Use Abstract Classes for Flexible Inheritance in Kotlin

14 Implementing Interfaces in Kotlin: Multiple Inheritance Explained

15 Difference Between Abstract Classes and Interfaces in Kotlin

16 What Are Data Classes in Kotlin? A Beginner's Guide

17 When and How to Use Data Classes in Kotlin

18 Kotlin: Automatically Generated Methods in Data Classes (`toString`, `hashCode`, `equals`)

19 Using `copy` to Clone and Modify Data Class Objects in Kotlin

20 What Are Sealed Classes in Kotlin?

21 Using Sealed Classes for Restricted Class Hierarchies in Kotlin

22 Practical Use Cases for Sealed Classes in Kotlin

23 Understanding Encapsulation in Object-Oriented Programming in Kotlin

24 Using Private, Protected, and Public Modifiers in Kotlin

25 How to Define Properties in Kotlin Classes

26 Writing Getters and Setters for Properties in Kotlin

27 Using Backing Fields (`field`) in Kotlin

28 Static-Like Behavior with Companion Objects in Kotlin

29 How to Use Nested and Inner Classes in Kotlin

30 Object Expressions and Anonymous Classes for Dynamic Behavior in Kotlin

31 Understanding Polymorphism with Interfaces and Abstract Classes in Kotlin

32 Using `is` and Smart Casting for Type Checking in Kotlin

33 Dynamic Dispatch in Kotlin: How Method Resolution Works

34 What Are Enums in Kotlin?

35 Defining and Using Enum Classes in Kotlin

36 Advanced Enum Features in Kotlin: Methods and Properties

37 Best Practices for Writing Object-Oriented Code in Kotlin

38 Real-World Applications of Object-Oriented Programming in Kotlin