Select the correct option to test your answer:
More Computer Questions
What exception thrown by parseInt() method?
Which Numeric Data type has the largest range?
What is the purpose of the 'using' directive in C++?
Which method is used to remove the last element from a list or tuple?
What is the output of the following code? public class Test{ public static void main(String args[]){ double[] myList = {1, 5, 5, 5, 5, 1}; double max = myList[0]; int indexOfMax = 0; for(int i = 1; i < myList.length; i++){ if(myList[i] > max){ max = myList[i]; indexOfMax = i; } } System.out.println(indexOfMax); } }