title: Indicate which vowel occurs the most in a string
body: <p>I am writing a program in Java that is supposed to give an output like this:</p>
  
  <ul>
  <li>vowels = 8</li>
  <li>upper = 2</li>
  <li>digits = 5</li>
  <li>whitespace = 6</li>
  <li>vowel i occurs the most = 4</li>
  </ul>
  
  <p>My code compiles and I was successful with everything except determining which vowel occurs the most. </p>
  
  <p>I am not sure what I should do, first count how many times an individual vowel (like just "a") occurs (as opposed to how many total vowels occur in the string). After I find the total of each individual vowels, I am not sure what to use to determine the vowel with the maximum value. Once I am able to get these two steps, I then am not exactly sure how to properly output.  I would prefer to accomplish this with an if statement however, I don't know if that is possible or not.</p>
  
  <p>Any help/tips will be greatly appreciated, here is the code I have written:    </p>
  
  <pre><code>    // which vowel occurs the most
      if (ch == 'a')
        vowelA++;
      else if (ch == 'e')
        vowelE++;
      else if (ch == 'i')
        vowelI++;
      else if (ch == 'o')
        vowelO++;
      else if (ch == 'u')
        vowelU++;
  
      if (vowelA &gt; vowelE &amp;&amp; vowelA &gt; vowelI &amp;&amp; vowelA &gt; vowelO &amp;&amp; vowelA &gt; vowelU)
      {
        maxVowels = vowelA;
      }
    }
  
  // OUTPUT
  System.out.println("vowel" + " " + "occurs the most = " + maxVowels);
  
   }
  }
  </code></pre>