Skip to content

Instantly share code, notes, and snippets.

@jaranflaath
Created September 24, 2010 13:05
Show Gist options
  • Save jaranflaath/595322 to your computer and use it in GitHub Desktop.
Save jaranflaath/595322 to your computer and use it in GitHub Desktop.
public static int checkForNegativeAndReturnPositiveValue(int value) {
if (value < 0) {
return value * -1;
} else {
return value;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment