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 array of objects is a data structure that stores multiple instances(objects) of a class in contiguous memory locations. Each element(index) in the array contains a reference(pointer) to an object, allowing easy access and manipulation.
An element refers to each individual object stored within an array. Elements can be accessed by their index position starting from 0.
Reference: A reference is like a pointer or address that points towards the memory location where an object's data is stored. It allows us to access and manipulate the object's properties and behaviors.
Contiguous Memory: Contiguous memory refers to a block of memory locations that are adjacent or continuous in physical or virtual memory space.