In AP Computer Science A, an array of objects is a fixed-size data structure where each index holds a reference to an instance of a class (not the object itself), so every element starts as null until you assign an object to it.
An array of objects looks just like an array of ints, but there's a twist that trips up half of every AP CSA class. Each slot in the array doesn't hold the object itself. It holds a reference, which is basically an arrow pointing to where the object lives in memory. When you write Student[] roster = new Student[25];, Java gives you 25 slots, and every single one of them is null. No Student objects exist yet. You have a parking lot with 25 empty spaces, not 25 cars.
To actually fill the array, you assign an object to each index, often in a loop: roster[i] = new Student("Ava");. Once an element holds a real reference, you can call any of that class's methods through the array, like roster[i].getName(). This is where arrays (Unit 6) and writing classes (Unit 5) collide. Everything you learned about objects, constructors, and method calls still applies; the array just gives you a numbered lineup of them.
Arrays of objects sit at the intersection of two of the biggest chunks of the AP CSA course. Unit 6 (Array) covers creating arrays, traversing them with for and enhanced for loops, and using array.length. Units 2 and 5 (Using Objects, Writing Classes) cover references, constructors, and instance methods. An array of objects forces you to use both skill sets at once, which is exactly why the exam loves it. FRQ 3 on the AP exam is traditionally the Array/ArrayList question, and it almost always hands you a class and asks you to process a collection of its objects, like finding the highest-scoring player or removing entries that match a condition. If you can't traverse an array of objects and call methods on each element, you're leaving a quarter of the free-response section on the table.
Reference (Unit 2)
Object variables in Java store references, not objects, and an array of objects is just a row of those reference variables. This is why two indexes can point to the same object, and why changing the object through one index changes what you see through the other.
Element (Unit 6)
Each element in an object array starts as null, not 0 or an empty object. Calling a method on an unfilled element throws a NullPointerException, one of the most common runtime errors in MCQ answer choices.
array.length (Unit 6)
You traverse an array of objects exactly like an array of primitives, using a loop bounded by array.length or an enhanced for loop. The only difference is what you do inside the loop, which is usually calling a method on each object instead of doing math on a value.
Contiguous Memory (Unit 6)
The references themselves sit in contiguous memory, which is what makes index access fast. The actual objects can live anywhere on the heap, so the array is a tidy row of arrows pointing to scattered objects.
Multiple-choice questions test the null trap (what happens when you access an element before assigning an object to it), reference behavior (two indexes pointing to the same object), and trace-the-loop questions where each iteration calls a method on an element. On the free-response section, the Array/ArrayList question routinely gives you a class definition and asks you to write a method that traverses an array of that class's objects, calling accessor methods to find a max, count matches, or build a result. The pattern to drill is the same every time. Loop with array.length or an enhanced for loop, call the right method on each element, and handle the loop variable correctly. No released FRQ needs you to define the term, but nearly every recent FRQ 3 expects you to use the concept fluently.
An array of primitives like int[] stores actual values in each slot, and uninitialized elements default to 0 (or false for boolean). An array of objects stores references, and every element defaults to null. That's why int[] nums = new int[5]; is immediately usable but Student[] roster = new Student[5]; will throw a NullPointerException the moment you call roster[0].getName() without constructing objects first.
An array of objects stores references to objects at each index, not the objects themselves.
Declaring new Student[25] creates 25 null slots; you still have to construct an object for each index before using it.
Calling a method on a null element throws a NullPointerException, which is a favorite wrong-answer trap in MCQs.
You traverse an array of objects the same way as any array, with a standard for loop using array.length or an enhanced for loop, then call methods on each element.
Two different indexes can hold references to the same object, so a change made through one index is visible through the other.
FRQ 3 on the AP CSA exam typically requires processing an array or ArrayList of objects, making this one of the highest-value skills to practice.
It's a fixed-size array where each index holds a reference to an instance of a class, like Student[] roster = new Student[25];. You access individual objects by index and call their methods, such as roster[0].getName().
No. new Student[25] only creates 25 slots that all default to null. You have to construct each object separately, usually in a loop, before you can call methods on the elements.
Almost certainly because you accessed an element that was never assigned an object. Object array elements default to null, and calling any method on null throws a NullPointerException at runtime.
An array has a fixed length set at creation and uses bracket syntax like arr[i], while an ArrayList grows and shrinks and uses methods like get(i) and add(). The AP exam's collection FRQ may use either one, so know both syntaxes cold.
Use a standard for loop from 0 to array.length - 1 when you need the index, or an enhanced for loop like for (Student s : roster) when you just need each object. Inside the loop, call the object's methods to do your work.