From aab9175af0fa65cb770aeb188c6c1a64e0c92560 Mon Sep 17 00:00:00 2001 From: chenlw <874313221@qq.com> Date: Mon, 19 Dec 2016 10:20:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/com/platform/test/List2ArrayTest.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/com/platform/test/List2ArrayTest.java b/test/com/platform/test/List2ArrayTest.java index 3702af9e..62e569be 100644 --- a/test/com/platform/test/List2ArrayTest.java +++ b/test/com/platform/test/List2ArrayTest.java @@ -1,7 +1,10 @@ package com.platform.test; import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.junit.Test; @@ -24,5 +27,20 @@ public class List2ArrayTest { System.out.println(string); } } + + @Test + public void listTest() { + Map errmap = new HashMap(); + List sa = new ArrayList(); + sa.add("as"); + errmap.put("err", sa); + List errFile = new ArrayList(); + errFile.add("ss"); + errFile.addAll((Collection) errmap.get("err")); + for (String string : errFile) { + + System.err.println(string); + } + } }