Can any body help me in this program .
(a)convert the whole
String in lower case.
(b)Count the number of words which starts with a vowel.
(c)Retrieve the number of words and store them in an array.)
I wants to retrieve the number of words and store them in an array.
public class Assign1
{
public static void main(String[]args)
{
String s="I would like to be like an amitabachan. Kumar likes Julia Roberts.Pakistan is going to be super power next year.";int count=0;
//convert the whole string in lower case.
//count the number of words which starts with a vowel.
for(int i=0;i<s.length();i++)>
{
ch=Character.toLowerCase(s.charAt(i));
if (ch=='a' | | ch =='e'| | ch =='i'| | ch=='o'| | ch =='u')
count++;
}
System.out.println(s);
System.out.println(count);
System.out.println(s.length());
}
}