赞
踩
PriorityQueue<Map.Entry<String,Integer>> pq=new PriorityQueue<>(//pq的类型这里Map.Entry<K,V>应该就是指map中的一个元素的类型
(a,b) -> a.getValue()==b.getValue() ? b.getKey().compareTo(a.getKey()) : a.getValue()-b.getValue());
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。