Samar Bir wrote:
Why the compiler chose method with argument Number. Even Object was a perfect candidate to be selected. Can someone explain me the reason?
The section in the JLS is a bit complicated, but if you want to read it ...
http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2.5
The compiler choose the overloaded method, by a criteria called the "most specific method". It also does a lot of other things, but those are not relevant to your question.
Henry