4 Comments

  1. Xin

    The result depends on the config, with the default config, the answer is correct

    Reply
  2. ThunderFlash

    That was interesting, thanks for posting! I don’t compare objectsĀ with the equal sign, only with the {Objectname}.equals() function. That doesn’t use hacks like this šŸ™‚

    Reply

  3. Integer pool, one byte.

    Reply
  4. Bernard FRANCIS

    “The high value up to which Integers are cached can be updated using the system property java.lang.Integer.IntegerCache.high”

    This is true starting as of JDK 7. JDK 5 and 6 threshold values are hard coded.

    Reply

Leave a Reply