Java SE 8 Programmer I — Question 132

Which two array initialization statements are valid? (Choose two.)

Answer options

Correct answer: B, E

Explanation

Option B is valid because it properly initializes an array with a specified size and assigns values to each index. Option E is also valid as it correctly initializes an array with predefined values using the new int[] syntax. Options A, C, and D are incorrect due to syntax errors in array initialization.