Пересмотрел все предыдущие решения, но все равно не нашел решения проблемы в моем случае... Туплю уже. Помогите пожалуйста, где тут косяк?
package com.javarush.task.task08.task0828;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
/*
Номер месяца
*/
public class Solution {
public static void main(String[] args) throws IOException {
Scanner read=new Scanner(System.in) ;
String month=read.nextLine();
HashMap <Integer, String> map=new HashMap<>();
map.put(1, "January");
map.put(2, "February");
map.put(3, "March");
map.put(4, "April");
map.put(5, "Мay");
map.put(6, "June");
map.put(7, "July");
map.put(8, "August");
map.put(9, "September");
map.put(10, "October");
map.put(11, "November");
map.put(12, "December");
Iterator<Map.Entry<Integer, String>> iterator=map.entrySet().iterator();
while(iterator.hasNext()) {
Map.Entry<Integer, String> pair = iterator.next();
String value = pair.getValue();
if(month.equals(value))
{ int numMonth=pair.getKey();
System.out.println(month+" is the "+numMonth+" month"); break;}
}
}
}