a) abstract class Hello implements IHello{ public short hello(short a, short b){ return 0; } }
b) abstract class Hello implements IHello{ public short hello(int a, int b){ return 0; } }
General Comments The concept here is, the presence of ambiguous methods does not create a problem. A problem occurs when method is calling in an ambiguous way such that the compiler is not able to determine which method to call.
ans given is all are correct valid way. here is my take on this ----------------------- i dont see option b) as valid when i put in compiler...
i agree to u aruna ......option can't be correct as in that option we're actually trying to overload the method but in a wrong way as we are changing only the return type not the parameter anyway....