I can't pass the last 2 requirements for some reason. Tried adding commas and full stop as well but don't seem to work.
package com.codegym.task.task08.task0802;
/*
HashMap of 10 pairs
*/
import java.util.HashMap;
import java.util.Map;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
HashMap<String,String> hash = new HashMap<>();
hash.put("watermelon","melon");
hash.put("banana","fruit");
hash.put("cherry","fruit");
hash.put("pear","fruit");
hash.put("cantaloupe","melon");
hash.put("blackberry","fruit");
hash.put("ginseng","root");
hash.put("iris","flower");
hash.put("potato","tuber");
for(Map.Entry<String,String> map : hash.entrySet())
System.out.println(map.getKey()+" - "+map.getValue());
}
}