Home » How to synchronize ArrayList in Java

How to synchronize ArrayList in Java

by Online Tutorials Library

How to Synchronize ArrayList in Java?

We can use Collections.synchronizedList(List<T>) method to synchronize collections in java. The synchronizedList(List<T>) method is used to return a synchronized (thread-safe) list backed by the specified list.

Output:

Mango Banana Apple Strawberry Pineapple 

You may also like