title: Having trouble with java.lang.Math(i get an error stating I'm using an Int and it needs a String)
body: <pre><code>import java.util.Scanner;
  
  import java.lang.Math;
  
  public class TestMax {
  
      int minNum = 1, maxNum = 5;
  
      public int inputNum() {
          Scanner num = new Scanner(System.in);
          return inputNum();
  
      }
  
      public void displayNum(int userNum) {
          System.out.printf(Math.min(userNum, maxNum));
          System.out.printf(Math.max(userNum, minNum));
      }
  
      public static void main(String[] args) {
          TestMax input;
          input = new TestMax();
          int userNum = input.inputNum();
          input.displayNum(userNum);
  
      }
  
  
  }
  </code></pre>
  
  <p>Sorry about any incorrect formatting, it's my first time posting.  I'm creating a program for a school in which a user enters a number and the program then outputs the 'maxNum' or 'minNum' depending on whether the number entered is less than or greater than the min/maxNum.  I think I have everything right except for when it comes to the math function.  I want it to compare the userNum to the min/maxNum but its saying I'm using an int and need a string.  Any help would be greatly appreciated.</p>