Complete the code to declare an array of integers with size 5.
int[] numbers = new int[[1]];The array size must be 5 to hold five integers.
Complete the code to access the first element of the array.
int first = numbers[[1]];Array indexing starts at 0, so the first element is at index 0.
Fix the error in the code to assign value 10 to the third element.
numbers[[1]] = 10;
The third element is at index 2 because indexing starts at 0.
Fill both blanks to create an array and assign value 7 to its last element.
int[] arr = new int[[1]]; arr[[2]] = 7;
The array size is 5 (C), so the last element is at index 4 (A).
Fill all three blanks to create an array, assign 3 to first element, and 9 to last element.
int[] data = new int[[1]]; data[[2]] = 3; data[[3]] = 9;
The array size is 5, so indices go from 0 to 4. Assign 3 to index 0 (first element) and 9 to index 4 (last element).
