TreeMap delete the first flashback output

mark, is there time to sort out. Prior did not pay attention, mr today with this topN actually take effect better.

TreeMap

	map.lastEntry() //获取到treeMap中的第一个Entry或者最后一个Entry
	map.remove(map.firstKey())	//获取最后一个key
	map.lastEntry().getValue()	//获取最后一个key对应的的值
	map.remove(map.firstKey()	//倒叙






Published 131 original articles · won praise 79 · views 310 000 +

Guess you like

Origin blog.csdn.net/qq_31780525/article/details/79091506