Arrays of Objects

In this lesson, we investigate how Java stores objects in an array.

What is an array of objects?

While the entries in an array of primitive values are actually those values, the entries in an array of objects are only references to the objects, not the objects themselves. So even though our discussions and illustrations often will save space by depicting arrays as if they contained objects, they do not. The figure given below shows an array of strings in two different ways. ...

Access this course and 1400+ top-rated courses and projects.