If the value p being boxed is true, false, a byte, a char in the range \u0000 to \u007f, or an int or short number between -128 and 127, then let r1 and r2 be the results of any two boxing conversions of p. It is always the case that r1 == r2.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Allen Sylvester:
...if their primitive values are <128...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Reference equality (==) of objects wrapping values in the byte range (-128 through 127) is guaranteed only for boxing conversions.
Originally posted by Peter Gade Christensen:
... Am I on the right track?? ...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Allen
Integer, Long and Character wrappers return true if their primitive values are <128. (Reason: For saving memory wrapper references with values less than 128 are made to refer to the same Object on the heap)
~Sanjeev Singh<br />SCJP 1.5
Originally posted by Sanjeev Kumar Singh:
...Long wrapper returns false for eatch of their each primitive values...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org