Constructors

In this lesson, we'll learn how to create an instance of a class.

In the previous lesson, we learned what classes and objects are.

Constructors are special methods for the instantiation of an object in the class.

It is declared inside the class but can be defined outside as well. The constructor:

  • has the exact ...