Не проходит 3 условие
package com.javarush.task.task15.task1527;
import java.io.*;
import java.util.*;
/*
Парсер реквестов
*/
public class Solution {
public static void main(String[] args) throws IOException {
//add your code here
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String url = in.readLine();
ArrayList<String> list = new ArrayList<>();
String[] arrayStr = url.split("\\?");
String[] arrayStr2 = arrayStr[1].split("&");
for(String str : arrayStr2) {
// if (str.contains("=")) {
int index = str.indexOf("=");
if(index > 0) {
String temp = str.substring(0,index);
if (temp.equals("obj")) {
String objValue = str.substring(index+1);
list.add(objValue);
}
System.out.print(str.substring(0,index) + " ");
}
}
if (!list.isEmpty()) {
for (String objValue : list){
try{
System.out.println();
alert(Double.parseDouble(objValue));
} catch (NumberFormatException e){
System.out.println();
alert(objValue);
}
}
}
}
public static void alert(double value) {
System.out.println("double: " + value);
}
public static void alert(String value) {
System.out.println("String: " + value);
}
}