title: displaying a positive result instead of negative
body: <p>I am creating a java program that will ask the user to input 2 integers then it will display the sum, difference and product. I need help for how to make the difference not show a negative result for example if the user inputs a smaller number first such as 2 and 5 I want the program to display 3 instead of -3</p>
  <p>Here is the Java Code</p>
  <pre><code>/**
   * @author Robbie Ramirez
   * Unit2
   * This program will calculate the sum, difference, and product of two integers
   */
  
  //Scanner for user input
  
  import java.util.Scanner;
  
  public class Integer {
  
      public static void main(String[] args) {
  
          //Ask the user to input two integers
          Scanner sc = new Scanner(System.in);
          System.out.println(&quot;Input two integers&quot;);
  
          // Stored the input integers 
          int num1 = sc.nextInt(); 
          int num2 = sc.nextInt();
  
          // Integers sum, difference, and product calculation 
          int sum = num1 + num2;
          System.out.println(&quot;\nThe sum is &quot; + sum);
  
          int difference = num1 - num2;
          System.out.println(&quot;\nThe difference is &quot; + difference);
  
          int product = num1 * num2;
          System.out.println(&quot;\nThe product is &quot; + product);
      }
  }
  </code></pre>