Disregarding the fact that it wont verify although the output matches the condition, somehow i apparently do not display text? what is wrong here. I am certainly printing.
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<Integer, String> hash = new HashMap<>();
while(true){
String s = reader.readLine();
String s2 = reader.readLine();
if(s==null){break;}
int id = Integer.parseInt(s);
String name = s2;
hash.put(id,name);
if(s2==null){break;}
}
for(Map.Entry<Integer,String> pair : hash.entrySet()){
int id = pair.getKey();
String name = pair.getValue();
System.out.println(id + " " + name);
}
}
}