Question: Java Program Write a method public static TreeSet getSet(String s) which takes a String Converts to lower case Remove punctuation marks Breaks into individual words
Java Program
Write a method
public static TreeSet
which takes a String
- Converts to lower case
- Remove punctuation marks
- Breaks into individual words using split()
- Returns a TreeSet of the words
It should return the words in ascending order. Write a program which reads the string from the user, calls getSet() and displays the results.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
