title: Error: java.lang.NumberFormatException
body: <p>I'm having difficulties fixing my code. The error message I receive is:</p>
  
  <p>Exception in thread "main" java.lang.NumberFormatException: For input string: "60 45 100 30 20"
      at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
      at java.lang.Double.parseDouble(Unknown Source)
      at Lab3.main(Lab3.java:15)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.io.*;
  import java.math.*;
  
  public class Lab3 
  {
      public static void main(String[] args) throws IOException
      {
          InputStreamReader isr = new InputStreamReader(System.in);
          BufferedReader br = new BufferedReader(isr);
          double pVelocity, pAngle, tDistance, tSize, tElevation;
          double radians, time, height, pDistance;
          String input = br.readLine();
  
          String[] values = input.split("\\+");
          pVelocity = Double.parseDouble(values[0]);
          pAngle = Double.parseDouble(values[1]);
          tDistance = Double.parseDouble(values[2]);
          tSize = Double.parseDouble(values[3]);
          tElevation = Double.parseDouble(values[4]);
  
          while(pVelocity != 0 &amp;&amp; pAngle != 0 &amp;&amp; tDistance != 0 &amp;&amp; tSize != 0 &amp;&amp; tElevation != 0)
          {
              radians = pAngle*(Math.PI/180);
              time = tDistance/(pVelocity*Math.cos(radians));
              height = (pVelocity*time*Math.sin(radians))-(32.17*time*time)/2;
              pDistance = time*(pVelocity*Math.cos(radians));
  
              if(pVelocity*Math.cos(radians) == 0)
                  System.out.print("The computed distance cannot be calculated with the given data.");
              else if(height &gt; tElevation &amp;&amp; height &lt;= tSize)
                  System.out.print("The target was hit by the projectile.");
              else if(height &lt; tElevation)
                  System.out.print("The projectile was too low.");
              else if(height &gt; tSize)
                  System.out.print("The projectile was too high.");
              else if(pDistance &lt; tDistance)
                  System.out.print("The computed distance was too short to reach the target.");
              else if(height &lt; 0)
                  System.out.println("The projectile's velocity is " + pVelocity + "feet per second.");
                  System.out.println("The angle of elevation is " + radians +"degrees.");
                  System.out.println("The distance to the target is " + tDistance + "feet.");
                  System.out.println("The target's size is " + tSize + "feet.");
                  System.out.println("The target is located " + tElevation + "feet above the ground.");
          }
      }
  }
  </code></pre>
  
  <p>I believe I've correctly parsed my double variables into string variables, and Eclipse shows no further errors upon compilation. Can anyone suggest a solution to this problem? </p>