Почем когда я в методе
removeAllSummerPeople
когда я попытался повторно итерировать Карту, мне показывает, что она пустая? package com.javarush.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Iterator;
import java.util.Map;
import java.util.HashMap;

/*
Добрая Зинаида и летние каникулы
*/

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 1 2012"));
        map.put("Айвазов", dateFormat.parse("JULY 1 2012"));
        map.put("Шринке", dateFormat.parse("MAY 1 2012"));
        map.put("Полков", dateFormat.parse("JUNE 1 2012"));
        map.put("Стасов", dateFormat.parse("MAY 1 2012"));
        map.put("Сталл", dateFormat.parse("OCTOBER 1 2012"));
        map.put("Стал", dateFormat.parse("MAY 1 2012"));
        map.put("Ста", dateFormat.parse("JANUARY 2 2012"));
        map.put("Ст", dateFormat.parse("AUGUST 1 2012"));
        map.put("С", dateFormat.parse("MAY 1 2012"));
        removeAllSummerPeople(map);
        return map;
    }

    public  static void removeAllSummerPeople(Map<String, Date> map) {

        Iterator<Map.Entry<String,Date>> iter=map.entrySet().iterator();
        while (iter.hasNext()){

            Map.Entry entry=iter.next();
            Date value = (Date) entry.getValue();
            if ((value.getMonth()>5)&&(value.getMonth()<9)) {
                iter.remove();
                //System.out.println(value.getMonth()+"efsefsdf");
            }
           // System.out.println(entry);
        }
        Iterator<Map.Entry<String,Date>> iter1=map.entrySet().iterator();
        while (iter1.hasNext()){

            Map.Entry entry=iter1.next();

            System.out.println(entry);
        }


    }

    public static void main(String[] args)throws ParseException  {
        //System.out.println(createMap());

    }
}