Created
April 5, 2018 03:49
-
-
Save david-mart/655799f17f6dab354b08913edf6804d9 to your computer and use it in GitHub Desktop.
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 class MinMethod { | |
static int getMin(int a, int b) { | |
if( a < b ) { | |
return a; | |
} else { | |
return b; | |
} | |
} | |
static int getMin3(int x, int y, int z) { | |
int min = getMin(x, y); | |
return getMin(min, z); | |
} | |
public static void main(String args[]) { | |
int minimum = getMin3(5,7,3); | |
System.out.print(minimum); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment