Not sure what I am doing wrong
package com.codegym.task.task10.task1019;
import java.io.*;
import java.util.*;
/*
Functionality is not enough!
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
HashMap<String, Integer> map = new HashMap<>();
while(true) {
String s = reader.readLine();
if(s.equals(""))break;
int id = Integer.parseInt(s);
String name = reader.readLine();
if(name.equals(""))break;
map.put(name, id);
}
map.forEach((name,id) ->{System.out.println(id + " " + name);});
/*for(Entry<String, Integer> entry : map.entrySet()) {
System.out.println(entry.getKey() + " " + entry.getValue());
}*/
}
}