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