Прошу помочь. Видимо, я не вижу очевидных вещей
package com.javarush.task.task15.task1527;
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));
String s = reader.readLine();
HashMap<String, String> map = new HashMap<>();
int i = s.indexOf('?');
s = s.substring(i+1);
String[] words = s.split("&");
for(String word : words){
if (word.contains("=")) {
i = word.indexOf('=');
map.put(word.substring(0,i)+" ", word.substring(i+1)+" ");
} else map.put (word+" ", null);}
for (Map.Entry<String, String> entry : map.entrySet()) {
System.out.print(entry.getKey()+ " ");}
System.out.println("");
for (Map.Entry<String, String> entry : map.entrySet()) {
if(entry.getKey().contains("obj")){
try {
if (entry.getValue().contains("."))
alert(Double.parseDouble(entry.getValue()));
else alert(entry.getValue());
}
catch (NumberFormatException e) {
}
}
}
}
public static void alert(double value) {
System.out.println("double: " + value);
}
public static void alert(String value) {
System.out.println("String: " + value);
}
}