Last active
October 30, 2017 10:53
-
-
Save s1monw1/832ea7346136d8003d4aca8511dfeea7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Overloader { | |
public static void main(String[] args) { | |
Overloader o = new Overloader(); | |
o.testWithoutPrint(2); | |
o.test(2); | |
} | |
public void test(int a, boolean printToConsole) { | |
if (printToConsole) System.out.println("int a: " + a); | |
} | |
public void testWithoutPrint(int a) { | |
test(a, false); | |
} | |
public void test(int a) { | |
test(a, true); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment