I am trying to make a program on word count which I have partially made and it is giving the correct result but the moment I enter space or more than one space in the string
you should make your code more generic by considering other word separators as well.. such as "," ";" etc.
public class WordCounter{
public int count(String input){
int count =0;
boolean incrementCounter = false;
for (int i=0; i= 'A' && c<='Z') || (c >= 'a' && c<='z');
}
}