Monthly Archive: March 2017

The Internal Cache of Integers 0

The Internal Cache of Integers

Instances of Integer and other wrapper classes are cached by the JVM for increased performance. package collections;   public class IntegerCache { private static void test(Integer i, Integer i2) { System.out.println(i); if (i ==...