Skip to content

Instantly share code, notes, and snippets.

@raypulver
Created October 27, 2018 23:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raypulver/591029669562575df83eee2157ae6fb5 to your computer and use it in GitHub Desktop.
Save raypulver/591029669562575df83eee2157ae6fb5 to your computer and use it in GitHub Desktop.
max
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