Please explain an array question

July 6, 2016 at 04:50:33
Specs: Windows 7
Suppose that we are given the following code:

int[] myArray = {1, 3, 5, 7, 9, 11, 13, 15};
for (int i = 0; i < myArray.length; i++) {
myArray[i] = 10 - myArray[i];
}
After it is executed what will the array myArray contain?( Please explain in details)


See More: Please explain an array question

Report •

#1
July 6, 2016 at 05:07:55
I'm sorry, but we don't do students' homework for them.

If you want to know what the array will contain, run the code and look.


Report •

#2
July 6, 2016 at 09:38:56
It is OK to ask questions about the detail but to just plonk the question on a forum and wait for the answer is cheeky and will do your future no good at all.

Always pop back and let us know the outcome - thanks


Report •
Related Solutions


Ask Question