Complete the code to declare an array of integers named numbers.
int[] [1] = new int[5];
The array is named numbers as declared in the code.
Complete the code to assign the value 10 to the first element of the array.
numbers[[1]] = 10;
Array indexes in Java start at 0, so the first element is at index 0.
Fix the error in the code to print the length of the array.
System.out.println(numbers[1]);In Java, arrays have a length property without parentheses to get their size.
Fill both blanks to create an array of 3 strings and assign "apple" to the first element.
String[] [1] = new String[[2]]; [1][0] = "apple";
The array is named fruits and has size 3, so new String[3].
Fill all three blanks to create an array of integers, assign 5 to the second element, and print it.
int[] [1] = new int[[2]]; [1][1] = [3]; System.out.println([1][1]);
The array scores has size 4, the second element (index 1) is assigned 5, and then printed.
