how to check the int range in java and limit it only 5digits
<p>Please help with my assignment. Here is the question:</p>

<blockquote>
  <p>Create a separate test driver class
  called TestEmployeePayroll that will
  test the EmployeePayroll class by
  performing the following:</p>
  
  <p>Prompt the user to enter the
  employees’ ID number, First name, Last
  name, Pay Category and Hours worked
  (one at a time).</p>
  
  <ul>
  <li>The user entry for employees ID
  number must be exactly 5 digits long.</li>
  <li>The user entry for Category must only
  be accepted if it is in the range 1
  to 4.</li>
  <li>The user entry for Hours worked
  must only be accepted if it is the
  range 1 to 80.</li>
  </ul>
</blockquote>

<p>This is what I did till now:</p>

<pre><code>import java.util.Scanner;
public class TestEmployeePayRoll {

    public static void main(String[] args){
        EmployeePayRoll obj1 = new EmployeePayRoll();

        Scanner input = new Scanner(System.in);
        System.out.println("Enter the Employee ID number: "+ " ");
        String EmployeeID = input.nextLine();

        //How to check the range here if int is 5 digits long or not ?

        System.out.println("Enter the first Name: "+ " ");
        String FirstName =  input.nextLine();

        System.out.println("Enter Last Name: "+ " ");
        String LastName = input.nextLine();

        System.out.println("Enter the Pay Category: "+ " ");
        double PayCategory = input.nextDouble();

        System.out.println("Enter the number of hours worked: "+ " ");
        double HoursWorked = input.nextDouble();
    }
}
</code></pre>
