-🚀 Heap pollution? 자바에서 힙 오염은 매개변수 유형이 서로 다른 타입을 참조할 경우 발생하는 문제인데, 문제는 컴파일 중에 정상적으로 처리되며 경고를 발생시키지 않는다. 나중에 런타임 시점에 힙 오염으로 ClassCastException이 발생한다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 public class HeapPollutionDemo { public static void main(String[] args) { Set s = new TreeSet(); Set ss = s; // unchecked warning s.add(new Integer(42)); // another unchecked warning Iterator iter = ss.iterator..