title: combine multiple if statements
body: <p>How do i make my program only use <strong>one if statement</strong> and an <strong>else statement</strong>?</p>
  
  <pre><code>import java.io.*;
  
  public class TwoNum {
      public static void main(String[] args){
          String first="";
          String second="";
  
          BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
  
          try{
              System.out.print("Input the first number: ");
              first = in.readLine();
  
              System.out.print("Input the second number: ");
              second = in.readLine();
  
          } catch(IOException e){
              System.out.println("Error!");
          }
  
          int number1=Integer.parseInt(first);
          int number2=Integer.parseInt(second);
  
          if(number1==number2){
              System.out.println("EQUIVALENT");
          }
          if(number1&gt;number2){
              System.out.println("GREATER THAN");
          }
          if(number1&lt;number2){
              System.out.println("LESSER THAN");
          }
      }
  }
  </code></pre>