This discussion is archived
10 Replies Latest reply: Nov 15, 2007 7:52 AM by 807603 RSS

Sorting an ArrayList question

800563 Newbie
Currently Being Moderated
Hi
I have any ArrayList like below
List<String> list = new ArrayList<String>();
list.add("FPR");
list.add("KLM");
list.add("FZT");
list.add("PKR");
I want to sort all the string having letter "F" so it would be be like below, the letter will be dynamically selected, and can be any thing like P or K,
"FZT"
"FPR"
"KLM"
"PKR"
Also i would like to sort it First by "F" then By "P" and then by "K"
so it would be
"FPR"
"FZT"
"PKR"
"KLM"
Ashish

Edited by: kulkarni_ash on Nov 15, 2007 9:45 AM