In Java Array we have discussed about the arrays of primitive data types. We can also create array of objects references and initialize data for each reference (or element) of the array. Objects references are explained in Java Objects References
If we have a class
Please note that, when we create an array, only the references are created and not the objects. Hence we need to create the objects separately as shown below at
Once the Student objects are created, then can be accessed using the dot operator (
The program To Print Student Details Using Classes In Java shows an working example of references array.