Код: Выделить всё
Map map = new HashMap();
PriorityQueue pq = new PriorityQueue((a, b) -> map.get(b[1]) == map.get(a[1]) ? b[2] - a[2] : map.get(b[1]) - map.get(a[1]));
List l = new ArrayList();
public TaskManager(List tasks) {
for(List t: tasks) {
map.put(t.get(1), t.get(2));
pq.add(new int[]{t.get(0), t.get(1), t.get(2)});
}
}
Код: Выделить всё
java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "java.util.Map.get(Object)" is null
Подробнее здесь: https://stackoverflow.com/questions/793 ... on-the-map
Мобильная версия