I have been spending most all of my time in the K&B on the studying "run" towards the
test. I happened to drift into another book just te get another perspective and I SWEAR that it said that "wrapper classes were immutable"..... that once they were assigned a value, that was IT!
Well, I just blew a question on a quiz because I said that an Integer reference (call it Integer x ) could NOT be incremented. I said that
would NOT compile.
Yet it did. I went and prototyped some tests and you can add TO Integers, you can increment.....
so my questions boil down to this:
a) are Wrapper class objects immutable?
b) if they ARE.... are these things working like Strings, where we build a new
string, stuff it in the reference and LOSE the old String?
What am I not seeing right...?