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
Static methods are methods that belong to the class itself, rather than an instance of the class. They can be called directly using the class name without creating an object of the class.
Related terms
Instance Methods: These methods belong to individual instances (objects) of a class and operate on specific data associated with those instances.
Constructor Methods: These special methods create objects from a class blueprint and initialize their initial state.
Accessor Methods (Getters) / Mutator Methods (Setters): Accessor methods retrieve values from object attributes while mutator methods modify those attribute values respectively.