Example & Tutorial understanding programming in easy ways.

How can Arraylist be synchronized?

We have a static methods of collection interface to make synchronized .By using these methods we can make synchronized Arraylist can be synchronized using:

Collection.synchronizedList(List list)
Other collections can be synchronized:
Collection.synchronizedMap(Map map)
Collection.synchronizedSet(Set set)
Collection.synchronizedCollection(Collection c)

Read More →