title: NumberFormatException when parsing the output of a BufferedReader
body: <p>I'm learning to use BufferedReader I've tried with only 1 variable (a) and I received a normal answer. But I get an error when I put more than two variables (a and b). </p>
  
  <pre><code>import java.io.*;
  
  public class Frequency {
  
    public static void main(String[] args) throws java.io.IOException
    {
      // these are the variables that make up the equation (y)
      double x , y, i, z, w, a, b, c;
      final double t;
      InputStreamReader isr =new InputStreamReader(System.in);
      BufferedReader br = new BufferedReader (isr);
      System.out.println(" Enter the value of a and b to solve for y ");
  
      String s1 ;
      s1=br.readLine();
      String s2 ;
      s2=br.readLine();
  
      // variables of the equation
      a =Double.parseDouble(s1);
      b= Double.parseDouble(s2);
      t= 0.002 * Math.pow(10,-2);
  
      // I separated the equation into different parts
      i= 2*3.14* Math.pow(10, 6) * t ;
      x = Math.sin(i);
      z= 2 * 3.14 *5 * Math.pow(10, 5);
      w= Math.cos(z);
      c= Math.exp(-a*t);
  
      // equation of y
      y= Math.abs(x+w)/c+ 50*b ;
      System.out.println(" The output of y is " + y);
    }
  }
  </code></pre>
  
  <p>Output 
  2 3</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: For input string: "2 3"
      at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
      at sun.misc.FloatingDecimal.parseDouble(Unknown Source)
      at java.lang.Double.parseDouble(Unknown Source)
      at homeworkcsc201.Frequency.main(Frequency.java:26)
  </code></pre>