Please , give me a key -whats wrong in my code?
package com.codegym.task.task08.task0829;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.*;
/*
Software update
*/
public class Solution {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
// List of addresses
HashMap<String, String> addresses = new HashMap<>();
while (true) {
String s = reader.readLine();
String f = reader.readLine();
if (s.isEmpty() || f.isEmpty()) break;
addresses.put(s, f);
}
// Read the house number
String fm = reader.readLine();
for (Map.Entry<String,String> pair : addresses.entrySet()){
if (fm.equals(pair.getKey())){
System.out.println(pair.getValue());
}
}
}
}