Why is my output correct but the solution is not accepted ?
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 {
HashMap<String, String> hmap = new HashMap<String, String>();
hmap.put("watermelon","melon");
hmap.put("banana","fruit");
hmap.put("cherry","fruit");
hmap.put("pear","melon");
hmap.put("cantaloupe","melon");
hmap.put("blackberry","fruit");
hmap.put("ginseng","root");
hmap.put("strawberry","fruit");
hmap.put("iris","flower");
hmap.put("potato ","tuber");
for (Map.Entry<String, String> me: hmap.entrySet()) {
System.out.println(me.getKey() + " - " + me.getValue());
}
}
}