Here is the problem, I am trying to write a small class which helps calculate the number of words in a String entered by the user.
The trouble is I am using the String method
split(" ") to calculate the words. But if by any chance there are extra white spaces within the string, it gives a wrong word Count.
Please advise & suggest