Unit 7 Day 2 Arrays WS #2 for Java
I. Write the code that will initialize each element of a 50component array, named values, to the value 10. (Note: declarevalues as well)
II. Write the output of the following program fragments.
int[ ] values = {25, 35, 45, 55};
for (int x = 0; x < 4; x++) System.out.print(values[x] + “”);
int[ ] values = {25, 35, 45, 55};
for (int x = 0; x <= 4; x++) System.out.print(values[x] + “”);
int[ ] list = {10, 20, 30, 40, 50};
for (int i = 5; i > 0; i–) System.out.print(list[i – 1] + “”);
int[ ] values = new
OR
OR