code: public static int findMaxIndex( int[] a ) {
  		int max = a[0];
  		int index = 0;
  
  		for( int i = 1; i< a.length; i++ ) {
  			int val = a[i];
  
  			if( val > max ) {
  				max = val;
  				index = i;
  			}
  		}
  
  		return index;
  	}
docs: Finds the index in 'a' with the largest value.
  @param a Input array
  @return Index of largest value