public static void sentencesChecker(String essay) {
int count = 0;
int countcap = 0;
int i , j;
for ( i = 0; i < essay.length(); i++) {
if (essay.charAt(i) == '.') {
count++;
}
for ( char e= 'A'; e<='Z';e++) {
if (essay.charAt(i)==e){
countcap++;
}
}
}
System.out.print("\n\t\t" + countcap + "out of " + count + "sentences start with a capital letter");
}