mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2026-10-25 17:42:27 +08:00
* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
873 B
873 B
Constructors
Constructors in Kotlin are special member functions within a class that are used to initialize objects of that class. They define how an object is created and what initial values its properties will have. Kotlin has two types of constructors: primary and secondary. The primary constructor is part of the class header, while secondary constructors are defined inside the class body using the constructor keyword. A class can have one primary constructor and multiple secondary constructors.
Visit the following resources to learn more: