here in this program we will go step by step
here is the code
this create an array that is able to store 3 objects of type Dozens.
Remember that an array is always an object in
java and here only one object is created and that is also of type Array
the three array elements can store objects of type Dozens but we have not created Dozen objects yet
This creates new Dozen object and now int[] dz is the instance member of class Dozens
so whenever we are creating Dozen object, in[] object is also getting created
again same, two a dozen object is created which has instance member int[] object
hence 2 more objects are created and the total number becomes 5 objects
now look into the code for terse explanation
hope this helps
Happy to help
happy preparation