I have used LinkedHashMap
because it is important the order in which keys entered in the map.
But now I want to get the value of key in the first place (the first entered entry) or the last.
Should there be a method like first()
and last()
or something like that?
Do I need to have an iterator to just get the first key entry? That is why I used LinkedHashMap
!
Thanks!
Question&Answers:os