Here you can find the source of max_of_ints(int[] data)
Parameter | Description |
---|---|
data | a parameter |
public static int max_of_ints(int[] data)
//package com.java2s; //License from project: Open Source License public class Main { /**// ww w . ja v a 2 s .c o m * Return max of integer array * * @param data * @return */ public static int max_of_ints(int[] data) { int max = data[0]; for (int x = 1; x < data.length; x++) { if (data[x] > max) { max = data[x]; } } return max; } }