Java tutorial
//package com.java2s; import java.util.*; public class Main { public static <T> LinkedList<T> newLinkedList() { return new LinkedList<T>(); } public static <T> LinkedList<T> newLinkedList(Collection<T> initData) { return new LinkedList<T>(initData); } public static <T> LinkedList<T> newLinkedList(T[] initData) { LinkedList<T> ret = new LinkedList<T>(); for (T t : initData) { ret.add(t); } return ret; } }