Thank you Marc!!!
You say
Reference equality (==) of objects wrapping values in the byte range (-128 through 127) is guaranteed only for boxing conversions.
I am assuming both the objects being compared need to be boxed? Correct?
some scenarios below ...
#1.So if you are comparing an object created using New with one created using intvalue (which is boxed per your note) one is boxed and one is not so I guess i1==i2 is a false?
i1 equals i2 is true of course (meaningfully equal)
#2. whereas below both are autoboxed so true and true
#3. and then in this scenario below 2 objects are created
and so == is false
and equals is true ?
#4. one is boxed and one is created new using valueOf() so
== is false
and equals is true
Am I on the right track?? Many thanks for responding again Marc!
[ November 06, 2006: Message edited by: Peter Gade Christensen ]