map獲取最大值value和其對應的key

public String getMaxStr(Map<String, Integer> map) { int maxV = 0; String maxK = null; String maxK_mayberemove = null;// 中間值,用於保存每次存在的最大值鍵,但存在下個值比他大,可用他移除掉,替換成最新的值 Map<String, Integer> map2 = new TreeM
相關文章
相關標籤/搜索