MCPcopy Create free account
hub / github.com/apna-college/Alpha / printMax

Method printMax

11_ArrayLists/PrintMaximum.java:4–12  ·  view source on GitHub ↗
(ArrayList<Integer> list)

Source from the content-addressed store, hash-verified

2
3public class PrintMaximum {
4 public static void printMax(ArrayList<Integer> list) {
5 int max = Integer.MIN_VALUE;
6 for(int i=0; i<list.size(); i++) {
7 if(max < list.get(i)) {
8 max = list.get(i);
9 }
10 }
11 System.out.println("max = " + max);
12 }
13 public static void main(String args[]) {
14 ArrayList<Integer> list = new ArrayList<>();
15 list.add(1);

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected