
import java.util.PrioirtyQueue;... PriorityQueue prioirtyQueue = new PrioirityQueue(); Integer value = priorityQueue.poll(); // poll()은 큐가 비어있을 경우 null 반환 // int value는 null 값 처리 불가능 // int로 할 경우, NullPointerException이 발생 if (value == null) { // null일 경우 } 컬렉션 자료구조를 사용할 때, 컨테이너가 비어있으면 NullPointException이 발생하는 경우가 종종 있다.이 때, Integer로 반환받으면 null을 처리할 수가 있다. int는..