The compiler likes to look at what happens when you call (invoke) a method; it doesn't much care what the return value is until and unless you assign it. See, with a function, you must use the parameters when you call it, but using the return value is optional. This originated in C (or possibly one of C's predecessors) with the function prototype.
Give a man a fish, he'll eat for one day. Teach a man to fish, he'll drink all your beer.
Cheers, Jeff (SCJP 1.4, SCJD in progress, if you can call that progress...)
One obvious reason why the method signatures used to choose between overloaded methods do not include the return type is that a method can be invoked in a stand-alone statement with no indication of the expected return type. This would mean that two overloaded mehods are ambiguous when called one way but unambiguous when called in an expression that uses the return value.
hi Rohan Kayan Um....I would like to think about if I am a compiler, which one I want to choose it. Please imagine that both of (methods signature) are the same present, so you can pick up either one which you like. I would like to accept the one that given by my girl friend.