• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

affichage de HashMap<String, List<String>>

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Salut,

Je ne parle pas francais. Try english.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Odd. A year ago English wasn't a problem for Christophe.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic