Complete the code to declare an integer array named numbers.
int[] [1];The correct way to declare an integer array named numbers is int[] numbers;.
Complete the code to initialize the array with 5 elements.
int[] numbers = new int[[1]];To create an array with 5 elements, use new int[5].
Fix the error in the array initialization syntax.
int[] numbers = [1] {1, 2, 3, 4, 5};
new keyword.int[] without new in this context.The correct syntax to initialize an array with values is new int[] {1, 2, 3, 4, 5};.
Fill both blanks to declare and initialize an array with values 10, 20, 30.
int[] [1] = [2] {10, 20, 30};
int[] without new for initialization.The array name is scores and the initialization requires new int[] before the values.
Fill all three blanks to create an array of strings with names and print the first element.
String[] [1] = [2] {"Alice", "Bob", "Charlie"}; System.out.println([3][0]);
new String[] in initialization.The array is named names, initialized with new String[], and printed by accessing names[0].
