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
An instance variable is a variable that belongs to an object and holds unique data for each instance of the class. It is declared within a class but outside any method.
Related terms
Class Variable: A class variable is a variable that belongs to the entire class rather than individual instances. It is shared among all instances of the class.