Question: in JAVA Write a method called stringToListOfWords() which takes in a String converts it into a list of words. We assumes that each word in
in JAVA Write a method called stringToListOfWords() which takes in a String converts it into a list of words. We assumes 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!"]. For extra credit, sanitize the String, cleaning it up so that we remove the punctuation and other extraneous characters such that the output in the above example would become ["Hello", "world"] This method returns List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
