Online Java Compiler By
JavaTpoint.com
import java.util.Collection; import java.util.concurrent.ConcurrentLinkedQueue; public class JavaCollectcionToArrayExample2 { public static void main(String[] args) { Collection
queue = new ConcurrentLinkedQueue(); for (int i=1;i<=10;i++) { queue.add(i); } Object[] a = queue.toArray(); for (int i = 0; i
Output