In a TreeMap, can I use a sorting algorithm other than the natural sorting for the keys?
Location: http://www.jguru.com/faq/view.jsp?EID=396730 Created: Apr 5, 2001 Author: John Zukowski (http://www.jguru.com/guru/viewbio.jsp?EID=7) Question originally posed by Shailesh Mangal (http://www.jguru.com/guru/viewbio.jsp?EID=57184 You can pass a Comparator to the TreeMap constructor to use a sorting order other than the natural order.