Here you can find the source of findMaxValueIndex(double[] d)
public static int findMaxValueIndex(double[] d)
//package com.java2s; // License as published by the Free Software Foundation. // public class Main { public static int findMaxValueIndex(double[] d) { int index = 0; double maxVal = d[0]; for (int i = 0; i < d.length; i++) { if (d[i] > maxVal) { index = i;//from w w w . j av a 2 s . c o m maxVal = d[i]; } } return index; } }