title: What's wrong with my 'else' statement?
body: <p>When running the program, I get the error below:</p>
  
  <p>Enter a number: 
  5
  Your original number is 5.0
  <strong><em>ERROR</em></strong> The input is not a number.</p>
  
  <p>I tried everything I can think of, but I am stumped. Following is the code snippet,</p>
  
  <pre><code>import java.util.Scanner;
  
  public class NegativeNumberConversion {
  
      public static void main(String[] args) {
          // Convert negative numbers to positive and display back to user
  
          // Create a console object for Scanner class
          Scanner input = new Scanner (System.in);
  
          // Declare variable
          double numberOne = 0;
  
          // Prompt user to enter number
          System.out.println("Enter a number: ");
  
          // Read in the number
          numberOne = input.nextDouble();
  
          // If the number is positive - display it
          if (numberOne &gt; 0){
  
          // Display it - Explain that it is the original number
          System.out.println("Your original number is " + numberOne);
  
          }else  {
  
          // Report the error
          System.out.println("***ERROR*** The input is not a number.");
  
          // Terminate the error
          System.exit(1);
  
      }
  
          // If the number negative - convert it to positive - 
          if(numberOne &lt; 0){
  
  
          // Display it - Explain that it was converted
          System.out.println("Your number was converted to " + (-1*numberOne) + " because it was negative.");
  
          }else{
          // Report the error
          System.out.println("***ERROR*** The input is not a number.");
  
          // Terminate the error
          System.exit(1);
      }
  
          // Close input
          input.close();
      }
  }
  </code></pre>