Possible Duplicate:
Sorting arraylist in Android in alphabetical order (case insensitive)
Hi everybody I have a small problem in sorting.
I am taking one collection of type String. When I am sorting it is giving me the wrong result that I was expecting
Here is my code :
List <String> caps = new ArrayList<String>();
caps.add("Alpha");
caps.add("Beta");
caps.add("alpha1");
caps.add("Delta");
caps.add("theta");
Collections.sort(caps);
It is sorting like:
Alpha Beta Delta alpha1 theta.
Here it can take any type of string even uppercase / lowercase. But the lowercase words are coming later.
I want the out put like :
Alpha alpha1 Beta Delta theta
Is there an easy built-in method for this?