Here you can find the source of maxIndex(int[] list)
public static int maxIndex(int[] list)
//package com.java2s; //License from project: Apache License public class Main { public static int maxIndex(int[] list) { int bi = -1; for (int i = 0; i < list.length; i++) if (bi == -1 || list[i] > list[bi]) bi = i;//from www .java2 s. co m return bi; } public static int maxIndex(double[] list) { int bi = -1; for (int i = 0; i < list.length; i++) if (bi == -1 || list[i] > list[bi]) bi = i; return bi; } }