java.lang.NullPointerException
at com.javarush.task.task10.task1019.Solution.main(Solution.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
package com.javarush.task.task10.task1019;
import java.io.*;
import java.util.*;
/*
Функциональности маловато!
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Map<String,Integer> map = new HashMap<>();
String s = reader.readLine();
Integer id;
String name;
if(!s.isEmpty())
{
while(!s.isEmpty())
{
id = Integer.parseInt(s);
name = reader.readLine();
map.put(name,id);
s = reader.readLine();
}
}
}
}