Q. How do you declare a one-dimensional array in Java?
β
Correct Answer: (A)
int[] myArray;
Explanation: In Java, a one-dimensional array is declared by specifying the type of elements followed by square brackets and then the array name. The correct syntax is: