Что не так???
package com.javarush.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.HashSet;
import java.util.Set;
import java.util.Iterator;
/*
Добрая Зинаида и летние каникулы
*/
public class Solution {
public static Map<String, Date> createMap() throws ParseException {
DateFormat dateFormat = new SimpleDateFormat("MMMMM d yyyy", Locale.ENGLISH);
Map<String, Date> map = new HashMap<>();
map.put("Сталлоне", dateFormat.parse("MAY 4 2012"));
map.put("Vwef", dateFormat.parse("JANUARY 1 2013"));
map.put("fwefwe", dateFormat.parse("FEBRUARY 12 2014"));
map.put("awfwefwe", dateFormat.parse("MARCH 5 2015"));
map.put("rgre", dateFormat.parse("APRIL 11 2016"));
map.put("erger", dateFormat.parse("JUNE 14 2017"));
map.put("sdvvsbv", dateFormat.parse("JULY 13 2018"));
map.put("dvervv", dateFormat.parse("AUGUST 7 2019"));
map.put("vwrvwrb", dateFormat.parse("SEPTEMBER 3 2020"));
map.put("vfvsvef", dateFormat.parse("NOVBER 8 2021"));
return map;
}
public static void removeAllSummerPeople(Map<String, Date> map) {
Iterator <Map.Entry<String, Date>> iterator = map.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry<String, Date> pair = iterator.next();
String key = pair.getKey();
Date value = pair.getValue();
if (value.toString().contains("Aug") || value.toString().contains("Jul") || value.toString().contains("Jun")){
iterator.remove();
}
}
}
public static void main(String[] args) {
}
}