devxlogo

October 18, 2017

Taking Advantage of Immutable Objects in Java

zero = new Integer(0);return Boolean.valueOf(“true”); Integer and Boolean are immutable; so, it is a bad idea to create objects that represent the same value, those classes have built-in caches for