Created
October 27, 2018 23:47
-
-
Save raypulver/591029669562575df83eee2157ae6fb5 to your computer and use it in GitHub Desktop.
max
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Max { | |
public static int max(ArrayList<Integer> list) { | |
int currentMax = Integer.MIN_VALUE; | |
for (int i : list) { | |
if (i > currentMax) currentMax = i; | |
} | |
return currentMax; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment