When you store data into an array, you need to change the index's value to point to the element in the array where you want the data stored. Normally the index starts at 0 and increases by 1 for each new item that is stored in the array.The above statement stores the data at the first element (index=0). If you want data put into the other elements in the array, the code needs to use a variable as index and increment the index every time data is stored in the array.anArray[0] = books;