Hashmap

Résolu/Fermé
ABIROU06 Messages postés 3 Date d'inscription mardi 4 mars 2014 Statut Membre Dernière intervention 6 mars 2014 - 4 mars 2014 à 11:40
tarek_dotzero Messages postés 817 Date d'inscription jeudi 19 juillet 2007 Statut Membre Dernière intervention 12 avril 2022 - 4 mars 2014 à 21:18
bonjour bon je suis entrain de faire une méthode hasp map est je me suis bloqué car je n'ai aucun information sur le hasp map
je recopie le code de l'internet avec un ai fort personnelle

public Mahashmap parseXml2(String hashmap )
throws Exception
{
try
{

Object val = Mahashmap.get(key);
if (mahashmap != null )
sfor( Iterator ii = Mahashmap.keySet().iterator(); ii.hasNext();) {
String key = (String)ii.next();
String value = (String) Mahashmap.get(key);

System.out.println("valeur de la cle : "+ key);
System.out.println("valeur de la valeur : "+ value);
}
}
catch (Exception ex) {
}
return(val);
}
A voir également:

1 réponse

tarek_dotzero Messages postés 817 Date d'inscription jeudi 19 juillet 2007 Statut Membre Dernière intervention 12 avril 2022 120
4 mars 2014 à 21:18
Bonour,

Hashmap fait partie des collections Java, c'est un outil pas un objectif, alors il faut mettre en quoi vous allez l'utiliser.

Sinon, jetez un coup d'oeil sur ce chapitre du livre DEJ :

https://jmdoudoux.developpez.com/cours/developpons/java/chap-collections.php

Bon Courage.
0