Here is another one...this time using equals() method.
Object class equals() method is used to
test object equality ie. to see if two instances of the same type are "meaningfully equal".
Q. The above doesn't compile saying:
Why int pi in the code above not boxed (wrapped) to an Integer object while invoking equals()? The code compiles and runs when the same expression is changed to i.equals(pi), in which case the argument pi IS wrapped.
Regards
Ravinder