Skip to content

Instantly share code, notes, and snippets.

@HennIdan
Created February 26, 2017 09:33
Show Gist options
  • Save HennIdan/03382bfebfd93fcbaec2164ab986b065 to your computer and use it in GitHub Desktop.
Save HennIdan/03382bfebfd93fcbaec2164ab986b065 to your computer and use it in GitHub Desktop.
public int iteratorMaxInteger() {
int max = Integer.MIN_VALUE;
for (Iterator < Integer > it = integers.iterator(); it.hasNext();) {
max = Integer.max(max, it.next());
}
return max;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment