What is wrong?
package com.codegym.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.*;
import java.util.Locale;
/*
Kind Emma and the summer holidays
*/
public class Solution {
public static HashMap<String, Date> createMap() throws ParseException {
DateFormat df = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
HashMap<String, Date> map = new HashMap<String, Date>();
map.put("Stallone", df.parse("JANUARY 1 1980"));
map.put("Stallone1", df.parse("JUNE 1 1980"));
map.put("Stallone2", df.parse("JUNE 1 1980"));
map.put("Stallone3", df.parse("JUNE 1 1980"));
map.put("Stallone4", df.parse("JUNE 1 1980"));
map.put("Stallone5", df.parse("MAY 1 1980"));
map.put("Stallone6", df.parse("APRIL 1 1980"));
map.put("Stallone7", df.parse("JUNE 1 1980"));
map.put("Stallone8", df.parse("JUNE 1 1980"));
map.put("Stallone9", df.parse("JUNE 1 1980"));
return map;
}
public static void removeAllSummerPeople(HashMap<String, Date> map) {
HashMap<String, Date> temp = map;
for(Map.Entry<String, Date> m : temp.entrySet()){
int month = m.getValue().getMonth();
String key = m.getKey();
if(month >4 && month < 8){
// System.out.println(m.getKey() + " : " + m.getValue().getMonth());
map.remove(key);
}
}
}
public static void main(String[] args) throws ParseException {
}
}