Created
December 13, 2017 19:24
-
-
Save penut85420/c547f7d786357e3da8e22a24a086f3ca to your computer and use it in GitHub Desktop.
A note of Overloading.
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 Overloading { | |
public static String foo(int n) { | |
return "This is int " + n; | |
} | |
public static String foo(String s) { | |
return "This is String " + s; | |
} | |
public static void main(String[] args) { | |
foo(2135); | |
foo("WhatTheMiserableCodingLife"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment