Unit 7 Day 2 Arrays Ws 2 Java Write Code Initialize Element 50 Component Array Named Valu Q37089560

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

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.