What would be the best way to achieve testCall2 below without doing explicit parsing (Sub1) in?
class Super {
}
class Sub1 extends Super {
}
class Sub2 extends Super {
}
public void testCall2(Super in) {
testCall(in); // <~~~ Compilation Error
}
public void testCall(Sub1 sub) {
}
public void testCall(Sub2 sub) {
}
testCallwould you like to be invoked?