Jeanne Boyarsky wrote:Shweta,
A great way to learn is to try things. Run it and see what the output is. Asking why is fine. Asking people to run the code for you is not.
when you pass null and two method exist that can accept it most specific is chosen. If most specific cannot be chosen (two method one that accept Integer and one that accept String for example)compiler error appear.