This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
In order to save memory, two instances of the
following wrapper objects (created through boxing), will always be == when their
primitive values are the same:
■ Boolean
■ Byte
■ Character from \u0000 to \u007f (7f is 127 in decimal)
■ Short and Integer from -128 to 127
Bye,
Nicola
Soumya Ranjan Mohanty
Ranch Hand
Joined: Mar 07, 2010
Posts: 44
posted
0
Ya it is from the book K&B..
But Still i have doubt in my Question why the two output are different. what is the difference between Integer i=10 and Integer i=1000. That means above 127 will not be same?? What is the reason?? also i didn't get that Sentence--" In order to save memory".