title: Converting a string into double and adding it to a variable
body: <p>As the title suggests, I came up with this code and I'm not sure why it doesn't do what it's supposed to do.</p>
  
  <pre><code>double value = 0;
  String input;
  
  input = scan.nextLine().toUpperCase();
  
      if (input.substring(0, 1) == "+") {
          value = value + Double.parseDouble(input.substring(1));
      }
  </code></pre>
  
  <p>Then, I typed the input "+ 25" (without the quotation marks). Also, <code>.toUpperCase</code> is there for another line of code; and then, printed the values to see if I got anything wrong.</p>
  
  <pre><code>System.out.println( input.substring(0, 1));
  System.out.println( Double.parseDouble(input.substring(1)) );
  System.out.println( value );
  </code></pre>
  
  <p>first one printed +</p>
  
  <p>second one printed 25.0</p>
  
  <p>and value printed out 0.0</p>
  
  <p>Everything seems to check, why is value still 0.0?</p>