for (int i=0;i<doubles.length;i++) if ((i == 0) || (doubles[i] > maximum)){
for (int i = 0; i < doubles.length; i++) { if ((i == 0) || (doubles[i] > maximum)) {
  public static int maxIndex(double [] doubles){    double maximum = 0;    int maxIndex = 0;    for (int i=0;i<doubles.length;i++)      if ((i == 0) || (doubles[i] > maximum)){	maxIndex = i;	maximum = doubles[i];      }    return maxIndex;  }