```
import java.util.Scanner;
public class SentenceVowels
{
    public static void main(String[] args)
    {
        int x,z, count, vowels;
        String sentence;
        char v;

        z = 0;
        vowels = 0;

        Scanner keyboard = new Scanner(System.in);
        System.out.print("Please enter a sentence, and the program" +
                        " will return the # of vowels: ");
        System.out.println();
        sentence = keyboard.nextLine();

        x = sentence.length();

        for(count=1; count <= x; count++)
            {
                char letter = sentence.charAt(z);
                isVowel(letter);
                if(v == 1)
                    vowels = vowels + 1;
                z++;
            }
        System.out.println("The amount of vowels in the sentence you inputed " +
                  " was: " + vowels);

    }

    public static char isVowel(char l)
    {
        int v, y;

        if ((l == 'a')||(l ==  'e')||(l ==  'i')||(l ==  'o')||
                (l == 'u'))
            {
                v = 1;
                return v;
            }

    }
}

```