Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

access to last value() in a TreeMap

843789Aug 18 2009 — edited Aug 20 2009
Hello,
I'm trying to retrieve the last Entry of a TreeMap because I must modify the content of my object Word.
I don't find a way to do it.
private SortedMap< Integer, Word >  wo = new TreeMap< Integer, Word >();
//I need something like:
   wo.lastValue().myModifiersOnWord()
Is it possible or I need change structure?
I used it because I need to keep a list ordered by Integer()

thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 17 2009
Added on Aug 18 2009
22 comments
630 views