Created
September 16, 2012 09:47
-
-
Save rchrand/3731814 to your computer and use it in GitHub Desktop.
Java - int min
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
public int min(){ | |
int minimum = list.get(0); | |
for (int i: list){ | |
if (i <= minimum) { | |
minimum = i; | |
} | |
} | |
return minimum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment