Hi all,
I want to sort the
string list in the following order.
game1, game2, game3, game10, game20, game110. I have tried with the below code, but it did not work. Can any one help me.
TreeSet ts = new TreeSet();
ts.add("game1");
ts.add("game10");
ts.add("game110");
ts.add("game3");
ts.add("game2");
ts.add("game20");
Iterator it = ts.iterator();
while (it.hasNext()) {
Object element = it.next();
System.out.println(element);
}
Thanks,
Venkat