Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 297 Bytes

File metadata and controls

10 lines (6 loc) · 297 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.