Arrays and matrices - unibz

Arrays and matrices 5 7.9 Example: search of the maximum element in an array of numbers We develop a static method, maxArray(), which takes as parameter an array of integers and returns the maximum value in the array. We assume that the array contains at least one element. A possible realization is the following: public static long maxArray(long[] v) {long max = v[0]; for (int i = 1; i < v ... ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download