{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:
- afficher un hash map
- deplacer le contenu hashmap dans un arraylist en java
- hashmap generique
- exemple de hashmap
- exemple utilisation "hashmap" java + graph
- hashmap lire
- java map collection exemple
- map string java example
- java parcourir generic hashmap
- hashmap exemple