Here you can find the source of min_of_ints(int[] data)
Parameter | Description |
---|---|
data | a parameter |
public static int min_of_ints(int[] data)
//package com.java2s; //License from project: Open Source License public class Main { /**//from w ww. jav a2 s . c om * Returns min of an array of ints * * @param data * @return */ public static int min_of_ints(int[] data) { int min = data[0]; for (int x = 1; x < data.length; x++) { if (data[x] < min) { min = data[x]; } } return min; } }