int[] myList = new int[]{ 2,4,6,8 }; for(int i = 0; i


What is the output? Image attached.



A.   4-16-36-64






B.  -416-3664




C.   4-1636-64


int[] myList = new int[]{ 2,4,6,8 };<br>for(int i = 0; i < myList.length; i++) {<br>if( i % 2 ==<br>myList[i] *= myList[i];<br>} else {<br>myList[i] *= myList[i] * -1;<br>}<br>0) {<br>}<br>for(int i = 0; i < myList.length; i++) {<br>System.out.print(myList[i]);<br>}<br>

Extracted text: int[] myList = new int[]{ 2,4,6,8 }; for(int i = 0; i < mylist.length;="" i++)="" {="" if(="" i="" %="" 2="=" mylist[i]="" *="myList[i];" }="" else="" {="" mylist[i]="" *="myList[i]" *="" -1;="" }="" 0)="" {="" }="" for(int="" i="0;" i="">< mylist.length;="" i++)="" {="" system.out.print(mylist[i]);="">

Jun 05, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here