Here you can find the source of findMax(int[] v)
Parameter | Description |
---|---|
v | Array concerned |
public static int findMax(int[] v)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from ww w . j a va2 s. com*/ * Find the greatest value from an array of integer * @param v Array concerned * @return Greatest value */ public static int findMax(int[] v) { int max = Integer.MIN_VALUE; for (int i = 0; i < v.length; ++i) { if (v[i] > max) { max = v[i]; } } return max; } }