Candibiotic
News Update :

Utility Classes: Collections and Arrays

Friday, August 21, 2009

Both of these java.util classes provide
A sort() method. Sort using a Comparator or sort using natural order.
A binarySearch() method. Search a pre-sorted array or List.
Arrays.asList() creates a List from an array and links them together.
Collections.reverse() reverses the order of elements in a List.
Collections.reverseOrder() returns a Comparator that sorts in reverse.
Lists and Sets have a toArray() method to create arrays
Share this Article on :

0 comments:

Post a Comment

 

© Copyright Vinayak Wins 2010 -2011 | Design by Herdiansyah Hamzah | Published by Borneo Templates | Powered by Blogger.com.