Deleting Items from an Array from Explore "Arrays"

In this section, you explain the difference between the capacity and length of an array. You also mention how default values are inserted into arrays. Then, you say, "Note that when we declare an Array of a certain size, we simply fix the maximum number of elements it could contain. Initially, the Array doesn't contain anything.".

I don't believe "... the Array doesn't contain anything" is correct. Is this correct? The length of an array is defined by the number of elements in an array. The capacity is the maximum number of elements an array can hold. By default, if we initialize an array of boolean data type, "false" will be inserted at each index. Is this correct? If this is true, the array does contain things. It contains default values at least.

Comments (0)