直接用lambda表达式:new PriorityQueue<>((o1,o2) -> o2 - o1)