Question: This is to done in Java with Sets (TreeSet). The task is given the following text below, which word comes 10th alphabetically of all the

This is to done in Java with Sets(TreeSet).

The task is given the following text below, which word comes 10th alphabetically of all the words used in the text. The case of the text should be ignored. Use a TreeSet in order to not count the same word multiple times. Note that you much change hyphens to spaces to make them 2 words and remove all other punctuation.

Also, in order to get the 10th word, you will have to call the pollFirst method 10 times.

THE TEXT IS (copy exactly as is):

Other major nickel producers: like Indonesia and the Philippines, can have loose regulations and even looser oversight. They can produce nickel far more cheaply than New Caledonia can. They even hold a large part of the world's nickle reserve. To compete against these low-cost rivals, New Caledonia is now positioning itself as a supplier of top-grade nickel for rechargeable batteries rather than the cheaper product used for stainless steel.

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!