Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 242 Bytes

constructors.md

File metadata and controls

7 lines (5 loc) · 242 Bytes

Constructors

When defining a class, you are allowed to make a special kind of method called a constructor.

A constructor runs before any code gets access to an instance of the class. You use it to set up the "initial state" for an object.