Exemple d’un ‘HashMap’ générique

Author:

 map, java
{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:

  • parcourir hashmap
  • exemple utilisation hashmap
  • exemple collection hasmap
  • c# hashmap
  • hashmap java exemple francais
  • hashmap de fonctions
  • parcourir hashmap java
  • generic collection
  • télécharger hashmap
  • map string java example

Leave a Reply

Your email address will not be published. Required fields are marked *