Here you can find the source of maxIndex(double[] array)
static public int maxIndex(double[] array)
//package com.java2s; //License from project: Open Source License public class Main { static public int maxIndex(double[] array) { double max = -999.0; int maxI = 0; for (int i = 0; i < array.length; i++) { if (array[i] >= max) { max = array[i];/*from www .j a v a 2 s .co m*/ maxI = i; } } return maxI; } }