MCPcopy Index your code
hub / github.com/Hazrat-Ali9/Computer-Programming / getMax

Method getMax

Problem5.java:7–16  ·  view source on GitHub ↗
(int[] inputArray)

Source from the content-addressed store, hash-verified

5public class Problem5 {
6
7 public static int getMax(int[] inputArray) {
8 int maxValue = inputArray[0];
9
10 for (int i = 1; i < inputArray.length; i++) {
11 if (inputArray[i] > maxValue) {
12 maxValue = inputArray[i];
13 }
14 }
15 return maxValue;
16 }
17
18 public static int getMin(int[] inputArray) {
19 int minValue = inputArray[0];

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected