Written by the Fiveable Content Team โข Last updated September 2025
Verified for the 2026 exam
Verified for the 2026 examโขWritten by the Fiveable Content Team โข Last updated September 2025
Definition
Constructors are special methods within classes that are used to initialize objects when they are created. They have the same name as the class and are called automatically when an object is instantiated.
A parameterized constructor is a constructor that accepts parameters/arguments during object creation and uses those values to initialize instance variables.