SCJP
Visit my download page
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
That is what everybody things, but it is not quite true. It is not -128…127 (you had the two numbers swapped), but -128…127 and maybe more. See this method, which by the way, you should regard as the preferred way to create an Integer object.Phil English wrote:Java has a pool of Integer objects (-127 to 128). . . .
Campbell Ritchie wrote:
That is what everybody things, but it is not quite true. It is not -128…127 (you had the two numbers swapped), but -128…127 and maybe more. See this method, which by the way, you should regard as the preferred way to create an Integer object.Phil English wrote:Java has a pool of Integer objects (-127 to 128). . . .
Well done finding that. There are lots of similar old discussions on the Ranch, but I can’t seem to find them at the moment. I can’t find any evidence of an AutoBoxCacheMin option, as you implied.Phil English wrote: . . . I found this link which shows . . . you can set the AutoBoxCacheMax property to increase the upper limit of the cache . . . .
Joanne
Campbell Ritchie wrote:
Well done finding that. There are lots of similar old discussions on the Ranch, but I can’t seem to find them at the moment. I can’t find any evidence of an AutoBoxCacheMin option, as you implied.Phil English wrote: . . . I found this link which shows . . . you can set the AutoBoxCacheMax property to increase the upper limit of the cache . . . .
Joanne Neal wrote:Ignore - I misread Campbell's post
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |