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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!