import [Link].
*;
import [Link];
public class WordCount {
public static void main(String[] args) throws FileNotFoundException {
//chCount
int acount=0;
File f=new File("C:\\Users\\ishu\\Desktop\\[Link]");
Scanner input = new Scanner(f);
String sen=[Link]();
[Link](sen);
char s[]={'a','e','i','o','u'};
char l[]={'A','E','I','O','U'};
for(int vowels=0;vowels<5;vowels++)
{
for(int i=0;i<[Link]();i++)
{
char ch=[Link](i);
if(ch==s[vowels] || ch==l[vowels])
{
++acount;
}
}
if(acount!=0)
[Link](s[vowels]+" occurs "+acount+"
times");
acount=0;
}
}
File program to read and convert to upper case:
import [Link].*;
import [Link];
public class WordCount {
public static void main(String[] args) throws Exception {
int ch;
FileReader f=new FileReader("D://java team/Third
yr/notes/[Link]");
FileWriter fw=new FileWriter("D://java team/Third
yr/notes/[Link]");
while((ch=[Link]())!=-1)
{
//[Link]((char)ch);
Character c1=new Character((char)ch);
char cc=[Link]((char)ch);
[Link](cc);
[Link](cc);
}
[Link]();
}
}