Get Synchronized List from ArrayList - Java Collection Framework

Java examples for Collection Framework:ArrayList

Description

Get Synchronized List from ArrayList

Demo Code


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
 
public class Main {
 
  public static void main(String[] args) {

    ArrayList arrayList = new ArrayList();
   // www  . ja  v  a  2 s . c om
    List list = Collections.synchronizedList(arrayList);
   
  }
}

Related Tutorials