package de.codegym.task.task08.task0802;
/*
HashMap für 10 Paare
*/
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
public class Solution {
public static void main(String[] args) throws Exception {
HashMap<String,String> fruits = new HashMap<String,String>();
fruits.put("Wassermelone" ,"Melone");
fruits.put("Banane" ,"Obst");
fruits.put("Kirsche" ,"Obst");
fruits.put("Birne" ,"Obst");
fruits.put("Cantaloupe" ,"Obst");
fruits.put("Brombeere" ,"Obst");
fruits.put("Ginseng" ,"Wurzel");
fruits.put("Erdbeere" ,"Obst");
fruits.put("Iris" ,"Blume");
fruits.put("Kartoffel" ,"Knolle");//schreib hier deinen Code
Iterator<Map.Entry<String, String>> iterator = fruits.entrySet().iterator();
for (Map.Entry<String, String> paar : fruits.entrySet())
{
String schluessel = paar.getKey(); // Schlüssel
String wert = paar.getValue(); // Wert
System.out.println(schluessel + "-" + wert);
}
}
}