title: Comparing two numbers using if/else statements
body: <p>I'm stumped trying to figure out how to compare two numbers to determine which one is larger and which one is smaller using if/else statements. </p>
  
  <p>As it stands, whenever I compile my code I get this error:</p>
  
  <blockquote>
    <p>method setNums in class NumberCompare cannot be given to applied types; required: no arguments, found:int,int; reason:actual and formal argument lists differ in length</p>
  </blockquote>
  
  <p>I am pretty sure that my class is not done well. So here is what I currently have.</p>
  
  <p><code>NumberCompare</code> class:</p>
  
  <pre><code>import static java.lang.System.*;
  
  public class NumberCompare
  {
      private int numberA, numberB;
      public NumberCompare(int a, int b)
      {
          numberA=a;
          numberB=b;
      }
      public void setNums ()
      {
          numberA = 45;
          numberB = 45;
      }
      public int getLargest ()
      {
          if(numberA &gt; numberB)
              System.out.println(+numberA+" is greater than " +numberB);
          return numberA;
      }
      public int getSmallest ()
      {
          if(numberA &lt; numberB)
              System.out.println(+numberB+" is less than " +numberA);
          return numberB;
      }
  }
  </code></pre>
  
  <p>And the runner class:</p>
  
  <pre><code>import static java.lang.System.*;
  public class NumberCompareRunner
  {
      public static void main( String args[] )
      {
          NumberCompare test = new NumberCompare(5,6);
          out.println(test);
          out.println("largest == " + test.getLargest());
          out.println("smallest == " + test.getSmallest()+"\n\n");
          test.setNums(45,45);
          out.println(test);
          out.println("largest == " + test.getLargest());
          out.println("smallest == " + test.getSmallest()+"\n\n");
          test.setNums(-25,10324);
          out.println(test);
          out.println("largest == " + test.getLargest());
          out.println("smallest == " + test.getSmallest()+"\n\n");
      }
  }
  </code></pre>
  
  <p>So in short my issue is that I can't get two numbers to be compared against each other. Thanks for any and all help. I also deeply apologize for my immature previous posting of this issue.</p>