Skip to content

Instantly share code, notes, and snippets.

@z-a-ki3
Created April 29, 2015 08:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z-a-ki3/b3f554949d7e0bbbd7f7 to your computer and use it in GitHub Desktop.
Save z-a-ki3/b3f554949d7e0bbbd7f7 to your computer and use it in GitHub Desktop.
class Foo {
void method(Object obj) { System.out.println("Object"); }
void method(Number obj) { System.out.println("Number"); }
void method(Integer obj) { System.out.println("Integer"); }
void method(char[] obj) { System.out.println("char[]"); }
}
public class Test {
public static void main(String[] args) {
Foo foo = new Foo();
foo.method("Hello");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment