Di ko alam alin jan papalitan na cannot find symbol nalilito nako. Dapat kase may return value sya di ko makuha lagi error. Sana mafix nyo po.
public class CountVowels {
public static void main(String []args) {
String str = "FAIL: First Attempt in Learning";
int vowels = 0;
}
public static int vowels(String str)
{
str = str.vowels();
for(int i = 0; i < str.length(); ++i)
{
char ch = str.charAt(i);
if(ch == 'a' || ch == 'e' || ch == 'i'
|| ch == 'o' || ch == 'u') {
++vowels;
}
{
return vowels;
}
}
System.out.println("String Value: " + str);
System.out.println("Total Number of Vowels: " + vowels);
}
}
public class CountVowels {
public static void main(String []args) {
String str = "FAIL: First Attempt in Learning";
int vowels = 0;
}
public static int vowels(String str)
{
str = str.vowels();
for(int i = 0; i < str.length(); ++i)
{
char ch = str.charAt(i);
if(ch == 'a' || ch == 'e' || ch == 'i'
|| ch == 'o' || ch == 'u') {
++vowels;
}
{
return vowels;
}
}
System.out.println("String Value: " + str);
System.out.println("Total Number of Vowels: " + vowels);
}
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.
Last edited: