title: How to count vowels and consonants and capitalizing first letter in a string while output using a method and return result
body: <p>If a user enters a string:  <code>hello there</code></p>
  
  <p>it should output</p>
  
  <pre><code>Hello has 2 vowels
  There has 3 consonants.
  </code></pre>
  
  <p>I know this is a fairly simple code but I am getting too many ideas and getting confused.
  I need a to make sure I have 2 methods for numberofVowels and capitalizeWord and both returns a result</p>
  
  <p>I am getting an error and I am still trying to figure out to capitalize after I got counting vowels work</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Hwk9
  {
          public static void main (String args[]) 
          {
                  Scanner stdin = new Scanner(System.in);
                  String string1;
                  System.out.println("Enter a string");
                  string1 = stdin.nextLine();
                  string1 = string1.toLowerCase();
  
          }
          public static int numberVowels(String string1)
          {
  
                  int count = 0;
                  int vowels = 0;
                  int consonants = 0;
                  for (int i = 0; i &lt; string1.length(); i++)
                  {
                          char ch = string1.charAt(i);
                          if (ch == 'a' || ch == 'e' || ch == 'i' || 
                                          ch == 'o' || ch == 'u')
                          {
                                  vowels++;
                          }
                          else
                          { 
                                  consonants++;
                          }
                  }
          }
  }
  </code></pre>