Try doing this.... (...) The TreeSet uses the natural sorting order for String, which is "empty space first", the "Capital letters", then lowers, then underscore....
Prem, you are new to the Ranch, so
I only cite your message, because it seems to be the most important part of this thread.
Now the unimportant part:
Perhaps Mo wanted us to remember, that below the entry window for your contributions, there is a button. When posting code, use it, otherwise you loose the indentations and the code looks less readable. But, Mo, you really shouldn't use this button