I have two methods in a class...
public void method(String var1, String var2, Object var3) {
//do stuff
}
public void method(String var1, String var2, Object[] var3) {
//do stuff
}
When I make the following call... obj.method("string", "string", obj)
the correct method is called, however, when I try to call obj.method("string", "string", obj[])
the first incarnation of that method is called.
Is there any annotation or "hint" I can give to make sure the method I anticipate being called will be called? I know an Object[]
is anObject
, but I would hope that at runtime the method with Object[]
would be called before Object
.