bonjour
j'essaie d'Afficher une hashmap

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
   Hashtable tableHachage = new Hashtable();
tableHachage.put("one", new Integer(1));
tableHachage.put("two", new Integer(2));
 
for( Iterator i = tableHachage.keySet().iterator(); i.hasNext();){
String key = (String)i.next();
System.out.print("\n"+key+ ":");
for ( String st : ((String[]) tableHachage.get(key)))
System.out.print( st+", ");
 
}
mais j 'ai une exception
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer
at Main.main(Main.java:26)
Pourriez vous m'aider ?