In JDK 1.5, calling new Integer() causes memory allocation. Integer.valueOf() is more memory friendly.