I think there's a bug in the "Array Deletions" article in the "Deleting Items from an Array" card under the "Arrays" explore topic. Here's a link to the article.
First, an array is initialized -
// Declare an integer array of 10 elements.
int[] intArray = new int[10];
// The array currently contains 0 elements
int length = 0;
// Add elements at the first 6 indexes of the Array.
for(int i = 0; i < 6; i++) {
intArray[length] = i;
length++;
}Then the array is printed out -
for (int i = 0; i < intArray.length; i++) {
System.out.println("Index " + i + " contains " + intArray[i]);
}The output is then said to be -
Index 0 contains 0.
Index 1 contains 1.
Index 2 contains 2.
Index 3 contains 0.
Index 4 contains 0.
Index 5 contains 0.
Index 6 contains 0.
Index 7 contains 0.
Index 8 contains 0.
Index 9 contains 0.Why are indices 3 through 5 said to contain 0? Shouldn't it be the numbers 3, 4 and 5 respectively?