Kotlin theorytheory 0/50 · 0%
OOP · easy

10. Primary and Secondary Constructors

Initializing classes.

The primary constructor is part of the class header. Secondary constructors use the 'constructor' keyword.

Check your understanding

  1. 1. Block for primary initialization logic?

  2. 2. Can you declare properties in the header?