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 getSet(String s)

which takes a String

  1. Converts to lower case
  2. Remove punctuation marks
  3. Breaks into individual words using split()
  4. 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

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!