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