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