BufferedReader br = new BufferedReader(new InputStreamReader(new InputStream( new FileInputStream(new File("classpath:hello.txt")))));int count = 0;while(br.read!=null){String str = br.readLine();count = getCount(str);}public int getCount(String str){int count =o;int length = String.length();char c = String.charAt(i)if((c>=a&&c<=z)||(c>=A&&c<=Z)){return count ++;
}
}