A word is a set of characters, delimited by spaces and punctuation.
Help solve
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
You can for example like this
Scanner in = new Scanner(System.in); String s = in.next(); UPDATE:
String[] words = s.split("\W"); Source: https://ru.stackoverflow.com/questions/578017/
All Articles