103k views
3 votes
What will be the results of the following code? final int ARRAY_SIZE = 5; double[] x = new double[ARRAY_SIZE]; for(int i = 1; i <= ARRAY_SIZE; i++) { x[i] = 10.0; }

1 Answer

4 votes

Answer:

An error will occur when the program runs.

Step-by-step explanation:

Out of bound error.

User NumberFour
by
4.0k points