JAVA SET MAP
Résolu/Fermé
alexandre23
Messages postés
36
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
27 janvier 2012
-
25 nov. 2011 à 18:14
alexandre23 Messages postés 36 Date d'inscription mercredi 12 octobre 2011 Statut Membre Dernière intervention 27 janvier 2012 - 26 nov. 2011 à 15:06
alexandre23 Messages postés 36 Date d'inscription mercredi 12 octobre 2011 Statut Membre Dernière intervention 27 janvier 2012 - 26 nov. 2011 à 15:06
A voir également:
- Setmap java
- Waptrick java football - Télécharger - Jeux vidéo
- Jeux java itel football - Télécharger - Jeux vidéo
- Java apk - Télécharger - Langages
- Waptrick java voiture - Télécharger - Jeux vidéo
- Java décompiler - Télécharger - Langages
2 réponses
KX
Messages postés
16760
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
12 février 2025
3 020
25 nov. 2011 à 21:14
25 nov. 2011 à 21:14
alexandre23
Messages postés
36
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
27 janvier 2012
11
26 nov. 2011 à 14:29
26 nov. 2011 à 14:29
ok merci,
Mais la par exemple pour le hashset, il y a un constructeur comme ceci :
HashSet(Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection.
Mais alors la niveau syntaxe je ne comprend plus rien et il n y a pas d'exemple
Avez vous deja eu a faire a ca ?
Mais la par exemple pour le hashset, il y a un constructeur comme ceci :
HashSet(Collection<? extends E> c)
Constructs a new set containing the elements in the specified collection.
Mais alors la niveau syntaxe je ne comprend plus rien et il n y a pas d'exemple
Avez vous deja eu a faire a ca ?
alexandre23
Messages postés
36
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
27 janvier 2012
11
26 nov. 2011 à 14:30
26 nov. 2011 à 14:30
Pareil pour les hashmap :
HashMap(Map<? extends K,? extends V> m)
Constructs a new HashMap with the same mappings as the specified Map.
HashMap(Map<? extends K,? extends V> m)
Constructs a new HashMap with the same mappings as the specified Map.
KX
Messages postés
16760
Date d'inscription
samedi 31 mai 2008
Statut
Modérateur
Dernière intervention
12 février 2025
3 020
26 nov. 2011 à 14:44
26 nov. 2011 à 14:44
En fait ça veut dire que tu peux faire :
ArrayList<String> liste = new ArrayList<String>(); liste.add("a"); liste.add("b"); ... HashSet<String> set = new HashSet<String>(liste); HashMap<String,Integer> map1 = new HashMap<String,Integer>(); map1.put("a",1); map1.put("b",2); ... HashMap<String,Integer> map2 = new HashMap<String,Integer>(map1);
alexandre23
Messages postés
36
Date d'inscription
mercredi 12 octobre 2011
Statut
Membre
Dernière intervention
27 janvier 2012
11
26 nov. 2011 à 15:06
26 nov. 2011 à 15:06
ok c'est parfait c droit ce qu'il me fallait . Merci et bonne fin de journée