|
|
|
|
|
by d0mine
6135 days ago
|
|
You're right. It calls 'void foo(Object o);' import junit.framework.TestCase;
public class TestMultimethods extends TestCase {
public void test() {
Object test = new Integer(4);
X x = new X();
assertEquals(x.foo(test), "foo(Object)");
}
}
class X {
String foo(Object i) { return "foo(Object)"; }
String foo(Integer i) { return "foo(Integer)"; }
}
|
|