Ciao a tutti,
come si fà ad ordinare un hashtable?
oppure posso ordinare un' array?

Io ho un'hashtable che utilizzo per accumulare valori a chiave identica, poi mi scorro hashtable con un enumeration e carico un String [][].


public String[][][] CreaMenu(ResultSet records){
.....

public Hashtable<String,String> ht1 = new Hashtable<String,String>();
public Hashtable<String,String> ht2 = new Hashtable<String,String>();
public Hashtable<String,String> ht3 = new Hashtable<String,String>();
...
...

righeMenu = new String[ht1.size()][ht1.size()][ht1.size()];
int a=0;
Enumeration en = ht1.keys();
while (en.hasMoreElements()) {
key1 = (String)en.nextElement();
value1 = (String)ht1.get(key1);
value2 = (String)ht2.get(key1);
value3 = (String)ht3.get(key1);
righeMenu[a][0][0]=value3;
righeMenu[a][1][0]=value1;
righeMenu[a][1][1]=value2;
a++;
}
return righeMenu;
}