{filelink=12246}
import java.util.HashMap;
public class Generic_Hash
{
public static void main(String[] args)
{
HashMap map = new HashMap();
map.put(1, "Janvier");
map.put(2, "Février");
map.put(3, "Mars");
map.put(4, "Avril");
map.put(5, "Mai");
System.out.println (map.get(2)); // février
}
}
A Voir sur le même Sujet:
- exemple utilisation hashmap
- generique hashmap
- java map générique
- comment parcourir une hashmap
- hashmap de fonctions
- lire un variable en hashmap
- retourner premeier enregistrement d un hashmap
- hashmap
- exception pour le doublon de clé hashmap
- exemple hashmap java