从数组创建LinkedList
//package com.nowjava; /* 时代Java - N o w J a v a . c o m 提 供 */ import java.util.LinkedList; public class Main { public static <T> LinkedList<T> linkedListOf(T... objects) { final LinkedList<T> list = new LinkedList<T>(); for (T object : objects) { list.add(object); } return list; } }