Online Java Compiler By
JavaTpoint.com
import java.util.*; public class CollectionsSynchronizedListExample2 { public static void main(String[] args) { //Create a list with items List
list = Arrays.asList(44, 55, 99, 77, 88, 66); //Create a synchronized List List
coll = Collections.synchronizedList(list); System.out.println("Synchronized list is :"+coll); } }
Output