title: How do I count too see how many numbers and letters are in a user inputted string?
body: <p>I have been asked to write an application that prompts the user for a String that contains at least five letters and at least five digits. Continuously reprompt the user until a valid String is entered. Display a message indicating whether the user was successful or did not enter enough digits, letters, or both. </p>
  
  <p>I am a beginner programmer and I need help figuring out how too make this application work correctly. My issue is I am unable to figure out how to make my program interpret the letters and numbers from user input. Here is what I have so far:</p>
  
  <pre><code>public static void main(String[] args) {
      // Declare variables. 
      String message;
      int numLetters = 0;
      int numDigits = 0;
      boolean letters = false;
      boolean digits = false;
      // Input.
      Scanner input = new Scanner(System.in);
      System.out.println("Type a message with 5 letters and 5 digits: ");
      message = input.nextLine();
      // Loop through string.
  </code></pre>