What is the output of the following code?
```
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);```
a. 0
b. 1
c. 2
d. 3
e. 4
b
You might also like to view...
When you copy text, it is placed in the Office ________, a temporary storage location in Microsoft Office applications
Fill in the blank(s) with correct word
In the following code for the __eq__ method for the Comparable class, what is the missing code?
?
def __eq__(self, other): if self is other: return True if type(self) != type(other):
A. return type(other) B. return other C. return False D. return self.priority