Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

public class Main {
    /*************************************
     * data type conversion
     **************************************/
    public static int idxOfMax(double[] values) {
        int ret = -1;
        double max = Double.MIN_VALUE;
        for (int i = 0; i < values.length; i++) {
            if (values[i] > max) {
                max = values[i];
                ret = i;
            }
        }
        return ret;
    }
}