I don't have any idea how to continue! How i must code to use the Data type in if(condition) to eliminate the 6, 7 and 8 month? 😞
package com.codegym.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
/*
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("JUNE 1 1980"));
map.put("Ionica", df.parse("APRIL 19 1950"));
map.put("Miclaus", df.parse("AUGUST 2 1996"));
map.put("Taganie", df.parse("JULY 25 1976"));
map.put("Loli", df.parse("AUGUST 28 1997"));
map.put("Iuli", df.parse("JULY 22 1976"));
map.put("Roxana", df.parse("DECEMBER 25 1988"));
map.put("Rom", df.parse("JUne 15 1976"));
map.put("Piixi", df.parse("JULY 25 1976"));
map.put("Trump", df.parse("MAY 30 1955"));
return map;
}
public static void removeAllSummerPeople(HashMap<String, Date> map) {
Iterator<Map.Entry<String, Date>>iterator=map.entrySet().iterator();
while(iterator.hasNext()){
Map.Entry<String, Date> pereche=iterator.next();
Date deExtras=pereche.getValue();
}
}
public static void main(String[] args) {
}
}