HashMap<String, String> cityAndName = new HashMap<String, String>(); // 地址列表 while (true){ if (!reader.readLine().isEmpty()){ String city = reader.readLine(); String name = reader.readLine(); cityAndName.put(city,name); }else { break; } }