Here you can find the source of findMaxIndex(final int[] array)
public static int findMaxIndex(final int[] array)
//package com.java2s; //License from project: Apache License public class Main { public static int findMaxIndex(final int[] array) { int maxIndex = 0; for (int i = 1; i < array.length; i++) { if (array[maxIndex] < array[i]) { maxIndex = i;// w w w .ja v a 2s .c om } } return maxIndex; } }