Integer Cache (JAVA) Integer Cache 2020. 1. 29. 14:24 Integer 초기화 방식에 대해서 알아보자 Integer i = 123; 해당한 줄 이 어떻게 생성이 될까? @HotSpotIntrinsicCandidate public static Integer valueOf(int i) { if (i >= IntegerCache.low && i archivedCache.length) { Integer[] c = new Integer[size]; int j = low; for(int i = 0; i < c.length; i++) { c[i] = new Integer(j++); } archivedCache = c; } cache = archivedCache; // range [-128, 127] must be interned (JLS7 5.1.7) assert Inte.. 이전 1 다음