idk what's problem with my code. Please please helpppp me...!!!!
package com.codegym.task.task08.task0816;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Month;
import java.util.*;
import java.util.Iterator;
import java.util.Calender;
/*
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"));
//write your code here
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("JUNE 1 1980"));
map.put("Stallone6", df.parse("JUNE 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"));
map.put("Stallone10", df.parse("JUNE 1 1980"));
return map;
}
public static void removeAllSummerPeople(HashMap<String, Date> map) throws ParseException {
//write your code here
int x;
Calender y = Calender. getInstance();
Iterator<Map.Entry<String, Date>> c = map. entrySet(). iterator();
while(c.hasNext()){
Map.Entry<String, Date> d = c.next();
Date date = d.getValue();
y.setTime(date);
x = y.get(Calender.MONTH);
if((x==5)||(x==6)||(x==7)){
c.remove();
}
}
}
public static void main(String[] args) {
}
}