Thursday, June 25, 2009

How to Sort a List


// Create a list
String[] strArray = new String[] {"e", "a", "A"};
List list = Arrays.asList(strArray);

// Sort
Collections.sort(list); // A, a, e

0 comments:

 

Sample Java Codes Copyright © 2008 Green Scrapbook Diary Designed by SimplyWP | Made free by Scrapbooking Software | Bloggerized by Ipiet Notez