//package com.nowjava;
import java.util.ArrayList;
import java.util.Collection;
/**
来 自 n o w j a v a . c o m - 时 代 Java
**/
public class Main {
public static void main(String[] argv) {
Collection col = java.util.Arrays.asList("asdf", "nowjava.com");
System.out.println(toArrayList(col));
}
public static <K> ArrayList<K> toArrayList(Collection<K> col) {
if (col == null) {
return new ArrayList<K>();
}/*来 自 nowjava.com - 时 代 Java*/
ArrayList<K> result = new ArrayList<K>();
/**代码未完, 请加载全部代码(NowJava.com).**/
本文系作者在时代Java发表,未经许可,不得转载。如有侵权,请联系nowjava@qq.com删除。