This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
No, but some of the wrapper classes, such as Integer, do have a built-in cache for frequently used values. For example, class Integer has a cache for all the values between -128 and 127. If you do this, for example:
Then both a and b will refer to the same Integer object, which the valueOf() method gets from the cache. Note that autoboxing makes use of the valueOf method, so that the same is true when using autoboxing:
The compiler automatically translates this to calls to valueOf(), and so a and b will refer to the same Integer object.
This subject is frequently discussed on the forums here. If you want to know more, do a search and read the previous discussions.