A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
how can be retrieve from any collection into our own order?
Joined: Jul 18, 2008
Jul 28, 2008 02:47:00
How can be retrieve elements from
,Hashtable... into our own order like reverse or ascending?
Thanks in Advance.
Joined: Apr 14, 2004
Jul 28, 2008 03:03:00
Use a Comparator, or make your objects Comparable, then you can sort your collection using whatever logic you like.
Joined: Oct 27, 2005
Jul 28, 2008 08:39:00
That will only work for
and Hashtable are not meant to be ordered.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: how can be retrieve from any collection into our own order?
Enumeration Object problem
search engine to search both at database and web application level
retrieve values randomly ?
CMP and data retrieval
automatic database connectivity
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014