I want to know that if using an Iterator over a TreeMap in Java interfere with the order of keys?
Returns a Set view of the keys contained in this map. The set’s iterator returns the keys in ascending order.
If for some reason you need the keys in descending order, you can use
If you want to iterate over the values, you can use
(Wow, I didn’t know that
Map isn’t a