Additionally to being able to have arrays of primitive data types , we can also have arrays of objects .
Having an array. of primitive data it’s very useful. However an array of objects are even more powerful. It will allow us to model programs/applications more logically and cleanly.
So how do we do this ?
Let’s look at it using an example. First of all we have this Car class. With a set and get methods.

Next we will go to our main class.

Wow , Implementing an array of objects it’s the same as creating array. But we using our Class name instead of a data type.
Next, we will implement a for loop to go through the array , and all its objects that are inside it .

Let’s call our get method so it will display the result from our input .

I wonder what the output will be ?

Would you look at that the input that we entered. Was save as objects inside the array that we created ! How cool !
Remember array of objects it’s really an array that references variables !!