Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
4486 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  Hashmap

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Hashmap

n°2035755
lologoetz
Posté le 13-11-2010 à 01:28:48  profilanswer
 

bonjour,
je voudrais associer un objet Couleur à un boolean dans mon programme
j'utilise donc une HasMap:
 
HashMap table= new HashMap<Couleur, boolean>();
 
mais eclipse me souligne boolean et me dit qu'il attend une dimension apres boolean
 
je ne comprends pas ce qu'il veut,
merci de votre aide

mood
Publicité
Posté le 13-11-2010 à 01:28:48  profilanswer
 

n°2035769
breizhbugs
Posté le 13-11-2010 à 12:05:32  profilanswer
 

bonjour,
peut être:

Code :
  1. HashMap<Couleur, boolean> table = new HashMap<Couleur, boolean>();


---------------
Seul Google le sait...
n°2035778
LeRiton
Posté le 13-11-2010 à 13:04:58  profilanswer
 

Ça et un B majuscule à Boolean : on ne pas pas paramétrer sur un type primitif.

n°2035813
masklinn
í dag viðrar vel til loftárása
Posté le 13-11-2010 à 18:49:36  profilanswer
 

LeRiton a écrit :

Ça et un B majuscule à Boolean : on ne pas pas paramétrer sur un type primitif.


C'est surtout ça, l'autre va juste faire un warning.


---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box by throwing away the limits imposed by overbearing genetic regulations? Isn't that a good thing?

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  Hashmap

 

Sujets relatifs
tableau associatif + HashMapHashmap arraylist et NullpointerExecption
Problème Hashmap en javaproblème de HashMap résolu, mais besoin d'explications, bug JAVA ?
Problème java.util.HashMap$KeyIterator@157f0dcProbleme avec Hashmap
Prob hashmap -> valeur associée à une clé changeante[java] intéret des hashmap?
HashMap recherche optimisée?Trier selon valeur HashMap
Plus de sujets relatifs à : Hashmap


Copyright © 1997-2025 Groupe LDLC (Signaler un contenu illicite / Données personnelles)