Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

java programmin

  Asked By: Abubakar    Date: Dec 10    Category: Java    Views: 847
  

i want a code of program to find a vowel of a strings

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Abhishek Singh     Answered On: May 22

import java.io.*;

public class findvowel
{

public static void main(String[] args) throws IOException
{
String s;
char c;
int i,j,cnt;
cnt=0;
System.out.println(“Enter the String : “);
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
s=br.readLine();
for(i=0;i<=j;i++)
{
c=s.charAt(i);
if(c==’a'||c==’A'||c==’i'||c==’I'||c==’o'||c==’O'||c==’u'||c==’U'||c==’e'||c==’E')
{
cnt++;
}
}
System.out.println(cnt);
}
}

 
Didn't find what you were looking for? Find more on java programmin Or get search suggestion and latest updates.




Tagged: