Implement the main(String[]) method so that it reverses the sign of an element of the array if the element is even.
Working with elements of an array
- 6
Locked
Comments (1)
- Popular
- New
- Old
You must be signed in to leave a comment
Chrizzly
12 August 2022, 14:39
Even if the concept is easy to understand, this exercise was not too easy, without having seen the syntax before.
Isn't there any better way, to go through the indices?
Maybe something like
?
Of course this won't work 1:1, but you understood my thought here. +1