public static int indexOf(double[] array, double value) {
		for (int i = 0; i < array.length; i++) {
			if (Double.compare(array[i], value) == 0) {
				return i;
			}
		}
		return -1;
	}
public static int indexOf ( double [ ] array , double value ) { for ( int i = 0 ; i < array . length ; i ++ ) { if ( Double . compare ( array [ i ] , value ) == 0 ) { return i ; } } return - 1 ; }
Finds the first occurrence of value in <code>double</code> array.