Powered by Blogger.
Showing posts with label List. Show all posts
Showing posts with label List. Show all posts

How to sort an ArrayList

>> Tuesday, October 2, 2012

Sorting any ArrayList is pretty simple. Using Collections.sort( ) method we can sort the ArrayList. Collections class having all the static methods, we can use those methods directly along with the class name. These methods return the object as type Collection.

The important methods to synchronize the List, Set and Map as

synchronizedList(List<T> list)
synchronizedSet(Set<T> s)
synchronizedMap(Map<K,V> m) 

A simple program to sort an ArrayList

Read more..

Related Posts Plugin for WordPress, Blogger...
© javabynataraj.blogspot.com from 2009 - 2022. All rights reserved.