Answer:
// Program is written in Java Programming Language
// Comments are used for explanatory purpose
import java.io.*;
public class countVowels
{
public static void main(String[] args) throws IOException
{
File file = new File("part1.txt");
FileInputStream fileStream = new FileInputStream(file);
InputStreamReader input = new InputStreamReader(fileStream);
BufferedReader reader = new BufferedReader(input);
String line;
// Initializing counters
int count = 0;
// Reading line by line from the file until a null is returned
while((line = reader.readLine()) != null)
{ // Check if line is not empty
if(!(line.equals(" ")))
{
characterCount += line.length();
char [] ch = new char[characterCount];
for(int I = 0; I<characterCount; I++)
{
if (str.charAt(i) = 'a' || str.charAt(i) = 'e' || str.charAt(i) = 'i' || str.charAt(i) = 'o' || str.charAt(i) = 'u' || str.charAt(i) = 'A' || str.charAt(i) = 'E' || str.charAt(i) = 'I' || str.charAt(i) = 'O' || str.charAt(i) = 'U')
{
count++;
}
}
}
}
System.out.print("Total Vowels = "+count);
}
}