Here you can find the source of argmax(float[] args)
public static int argmax(float[] args)
//package com.java2s; //License from project: Open Source License public class Main { public static int argmax(float[] args) { int result = 0; for (int i = 1; i < args.length; i++) { if (Float.compare(args[result], args[i]) < 0) result = i;/*from w w w . ja va 2 s . c om*/ } return result; } }