The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Boxing Conversion in J2SE 5.0
Subject:  Question about the Immutable Objects
Date:  2005-03-25 09:55:25
From:  krishnasrinivasan
Response to: Question about the Immutable Objects


As per Java Language Specification(JLS)certain values are stored as immutable wrapper objects and reused it later.They assume that these objects are used frequently, so that cached and reused.

The following is the list of primitives stored as immutable objects:

* boolean values true and false
* All byte values
* short values between -128 and 127
* int values between -128 and 127
* char in the range \u0000 to \u007F

 Feed java.net RSS Feeds