@@ -0,0 +1,1023 @@
+package findvowels;%0A%0A/**%0A * Write a short Java method that counts the number of vowels in a given%0A * character string.%0A *%0A * @author Khav%0A */%0Apublic class FindVowels %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        String str = %22LEts count vowels%22;%0A        int vowels_count = CountVowels(str);%0A        if (vowels_count != -1) %7B%0A            System.out.println(vowels_count);%0A        %7D%0A    %7D%0A%0A    /**%0A     *%0A     * @param str String%0A     * @return the number of vowels in a string ; -1 if string is empty%0A     */%0A    public static int CountVowels(String str) %7B%0A        int count = 0;%0A        int str_length = str.length();%0A        if (str_length == 0) %7B%0A            return -1;%0A        %7D%0A        str = str.toLowerCase();%0A        for (int i = 0; i %3C str_length; i++) %7B%0A            switch (str.charAt(i)) %7B%0A                case 'a':%0A                case 'e':%0A                case 'i':%0A                case 'o':%0A                case 'u':%0A                    count++;%0A            %7D%0A        %7D%0A        return count;%0A    %7D%0A%0A%7D%0A

Create FindVowels.java