Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

"Ideally, boxing a given primitive value p, would always yield an identical reference. In practice, this may not be feasible using existing implementation techniques. The rules above are a pragmatic compromise. The final clause above requires that certain common values always be boxed into indistinguishable objects. The implementation may cache these, lazily or eagerly." To convince our idea, we can take an insight of the source code of Integer of JDK 1.6.0_10:

...