Could Somebody check my code, and tell me what i did wrong ?
package pl.codegym.task.task10.task1019;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
/*
Funkcjonalność to nie wszystko!
*/
public class Solution {
public static void main(String[] args) throws IOException {
HashMap<String,Integer> Dane = new HashMap<>();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
while(true) {
try {
int id = Integer.parseInt(reader.readLine());
String imie = reader.readLine();
if (imie.equals("") || imie == null || imie.equals(null) ){
Dane.put("", id);
break;
}
Dane.put(imie,id);
}catch (NumberFormatException ex){ex.printStackTrace();}
}
for(Map.Entry<String,Integer> element : Dane.entrySet()){
String klucz = element.getKey();
Integer wartosc = element.getValue();
System.out.println(wartosc+" "+ klucz);
}
}
}