Java examples for java.util:Collection Creation
Create new Synchronous Queue
//package com.java2s; import java.util.concurrent.SynchronousQueue; public class Main { public static void main(String[] argv) { System.out.println(newSynchronousQueue()); }//from w w w .j ava 2s .co m public static <E> SynchronousQueue<E> newSynchronousQueue() { return new SynchronousQueue<E>(); } public static <E> SynchronousQueue<E> newSynchronousQueue( final boolean fair) { return new SynchronousQueue<E>(fair); } }