Skip to content

Instantly share code, notes, and snippets.

@PanAeon
Created October 12, 2015 09:54
Show Gist options
  • Save PanAeon/61ea94ea47f8b2602602 to your computer and use it in GitHub Desktop.
Save PanAeon/61ea94ea47f8b2602602 to your computer and use it in GitHub Desktop.
interface Callee {
public void foo(Object o);
public void foo(String s);
public void foo(Integer i);
}
class CalleeImpl implements Callee
public void foo(Object o) {
logger.debug("foo(Object o)");
}
public void foo(String s) {
logger.debug("foo(\"" + s + "\")");
}
public void foo(Integer i) {
logger.debug("foo(" + i + ")");
}
}
Callee callee = new CalleeImpl();
Object i = new Integer(12);
Object s = "foobar";
Object o = new Object();
callee.foo(i);
callee.foo(s);
callee.foo(o);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment