Lecture 12
9
TreeMap
•Java API provides class TreeMap
•Don’t ask why it’s called that
•Key can be any Object                                             (but our keys will always be String objects)
•TreeMaps, like ArrayLists
–can grow
–store Objects (references, not primitive types)
–are heterogeneous
•can hold objects of different types
•need to cast what you get from a TreeMap