code: public int getMaxValueIndex(double[] array) {
  
          int index = 0;
          double max = Integer.MIN_VALUE;
  
          for (int i = 0; i < array.length; i++) {
              if (array[i] > max) {
                  max = array[i];
                  index = i;
              }
          }
  
          return index;
      }
docs: Get the index position of maximum value the given array
  @param array an array
  @return	index of the max value in array