X1054: Every Other Index

Change the value at every even index in the given array to false. For example, given the array [true, true, true, true, true], this method would return [false, true, false, true, false]. As you can see, positions 0, 2, and 4 were set to false while positions 1 and 3 were left unchanged. Hint: not every numeric for loop has to increment by 1's.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.