Kotlin theorytheory 0/50 · 0%
OOP · medium

26. Companion Objects

Class-level members.

Kotlin doesn't have static members. Companion objects are used to define methods and properties tied to a class.

Check your understanding

  1. 1. How to access companion members?

  2. 2. Can a class have multiple companions?