From f40689145c5ff090560eec30ffbc0b629480cfa8 Mon Sep 17 00:00:00 2001 From: IT-xiaoXiong <774495953@qq.com> Date: Thu, 2 Dec 2021 15:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- customization/test/NewUtilTest.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/customization/test/NewUtilTest.java b/customization/test/NewUtilTest.java index 0e8580a..1065f46 100644 --- a/customization/test/NewUtilTest.java +++ b/customization/test/NewUtilTest.java @@ -333,4 +333,21 @@ public class NewUtilTest { System.out.println(matcher.group("field")); } } + + + @Test + public void testSplic(){ + List list = new ArrayList<>(); + list.add(0); + list.add(1); + list.add(2); + list.add(3); + list.add(4); + list.add(5); + list.add(6); + System.out.println(list); + System.out.println(list.subList(0,2)); + list.removeAll(list.subList(0,2)); + System.out.println(list); + } }