Task 6 of 9 · 0 solved · 9 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

5.1 Arrays — double all

Total: 0 / 4 pts
Practice mode — check each part and get hints as you go.
Task

Fill in doubleAll so that it changes the array: every element becomes twice as large. The method returns nothing.

main prints the array afterwards, so the program prints 2, 4, 6 — the change survives because the array object is shared.

Your solution