How can I sort a vector which has filesname with extension, but I want to sort it with extension. How can I do that. For input as abc.txt abc.pdf abc.doc def.doc def.txt def.pdf OutPut should be abc.doc def.doc abc.pdf def.doc abc.txt def.txt How can I achieve this. Cany anyone help me out to do this. Thanks, Abra
posted 11 years ago
You can use the method Collections.sort and use a Comparator.