I do not understand the example outputs. They show different things.
package com.codegym.task.task15.task1527;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Request parser
*/
public class Solution {
public static void main(String[] args) {
//write your code here
try
{
BufferedReader bufer = new BufferedReader(new InputStreamReader(System.in));
String url = bufer.readLine();
String url_2 = url.substring(url.indexOf("?") + 1);
String[] array = url_2.split("&");
System.out.println(array);
for(String s : array)
{
if(s.contains("."))
{
alert(Double.parseDouble(s));
}
else
{
alert(s);
}
}
}
catch(IOException e)
{
e.printStackTrace();
}
}
public static void alert(double value) {
System.out.println("double: " + value);
}
public static void alert(String value) {
System.out.println("String: " + value);
}
}