I want to sort a TreeMap by ascending order wrt "Student.name". I don't want to create a new ArrayList. Is there any way to do this?
Map studentMap = new TreeMap();
studentMap.put(id, student); //id is double
public class Student{
String name;
int number;
....
}