Howdy Ranchers,
while i was studying chapter 7 @ K&B
SCJP book, a question came up.
I am playing around with Maps, Sets and Lists.
So far i dont get the use of class TreeMap.
Maps = key based collections
TreeXXX = sorted
While i am able to create a sorted Map by using TreeMap i wonder what is the advantage compared to a unsortet Map.
TreeMap and HashMap got the same methods to access the values. They are key based. So why should i care the order? Unlike TreeSet i am not able to iterate through it.
Best regards,
Frank Hinkel