title: What's wrong with my Counting Vowels Application?
body: <p>So I was given this assignment in class to make a counting vowel application. I have no idea what's wrong with my code, but please take a look.</p>
  
  <pre><code>    package com.practice;
      import java.util.*;
  
      public class CountVowels {
          public static void main(String[] args) {
      Scanner input = new Scanner(System.in);
  
      int counter = 0;
      int vowels = 0;
  
      System.out.print("Enter text: ");
      String text = input.nextLine();
  
      int last = text.length() - 1;
  
      while (last &gt; 0) {
  
          char temp = text.charAt(counter);
  
          if (temp == 'a' || temp == 'e' || temp == 'i' || temp == 'o' || temp == 'u') {
  
              vowels++;
  
          }
          counter++;
          last++;
  
      }
  
      System.out.println("The number of vowels are: " + vowels);
  
  }
  </code></pre>
  
  <p>}</p>