aspose file tools*
The moose likes Java in General and the fly likes affichage de HashMap<String, List<String>> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "affichage de HashMap<String, List<String>>" Watch "affichage de HashMap<String, List<String>>" New topic
Author

affichage de HashMap<String, List<String>>

christophe seguinot
Greenhorn

Joined: Oct 19, 2007
Posts: 18
Bonjour,

j'ai le code suivant :
HashMap<String, List<String>> categoryIngredients = new HashMap<String, List<String>>();
List<String> ingredient1s = new ArrayList<String>();
ingredient1s.add("ing1");
ingredient1s.add("ing2");
List<String> ingredient2s = new ArrayList<String>();
ingredient2s.add("ing3");
ingredient2s.add("ing4");
categoryIngredients.put("viande", ingredient1s);
categoryIngredients.put("fruit", ingredient2s);

Je voudrais pouvoir afficher :
viande fruit
ing1 ing3
ing2 ing4

Mais je ne vois absolument pas comment faire.

Merci
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Salut,

Je ne parle pas francais. Try english.


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19784
    
  20

Odd. A year ago English wasn't a problem for Christophe.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: affichage de HashMap<String, List<String>>