Hi Jeeny, whenever a overloaded method was called with a parameter that can be assaignable to more than one overloaded method , then the method whose parameter(s) are assaignable to other method parameter type will be called. In your example u can always assaign Objecto type to the reference of type Object(i.e Object o in your case) Hope u got it. rishi
Hi Cathy The point is that Object's array is assignable to Object because an array is also an Object. But the reverse is not true. That is there is no gaurantee that an array will always be an Object. Hence array is printed.
Did some experimenting and it seems like the compiler is working very hard to find the most specific method that could possible work. I amplified the example a bit.As is the compiler complains about not being able to decide between Integer and Float. But if line 1 is commented out, "object array" prints. If line 1 is uncommented and line 2 is commented, "integer array" and "object array" prints.