Java tutorial
//package com.java2s; import java.util.ArrayDeque; import java.util.Collection; public class Main { public static <E> ArrayDeque<E> getArrayQueue() { return new ArrayDeque<E>(); } public static <E> ArrayDeque<E> getArrayQueue(Collection<? extends E> collection) { return new ArrayDeque<E>(collection); } public static <E> ArrayDeque<E> getArrayQueue(int initialCapacity) { return new ArrayDeque<E>(initialCapacity); } }