Question: Solve this in Java String Tokenization Write a method tokenize() returns a list of words from the input string. We assume that each word in
String Tokenization Write a method tokenize() returns a list of words from the input string. We assume that each word in the input string is separated by whitespace.? If our input String is "Hello, world!", then the output should be ["Hello,", "world!"). Challenge: For extra credit, sanitize the string - cleaning it up so that punctuation and other extraneous characters are removed. The final sanitized string would become ("Hello", "world")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
