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 can use this code.It may help you:
public static void main (String[] args) { System.out.println("Simple Java Word Count Program"); String str1 = "Today is Holdiay Day"; int count=0; String[] wCount=str1.split(" "); for(int i=0;i