From 1a645df671349aefa905ea2e284a89ca07524d22 Mon Sep 17 00:00:00 2001 From: msksbr Date: Tue, 11 Jun 2024 00:47:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E9=AA=8C=E4=BA=8C=E5=81=9A=E5=AE=8C?= =?UTF-8?q?=EF=BC=88=E5=96=9C=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 实验7/.vscode/settings.json | 9 +++++++-- 实验7/src/task2/WalkCollection.java | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/实验7/.vscode/settings.json b/实验7/.vscode/settings.json index 0ac215c..8899871 100644 --- a/实验7/.vscode/settings.json +++ b/实验7/.vscode/settings.json @@ -1,7 +1,12 @@ { - "java.project.sourcePaths": ["src"], + "java.project.sourcePaths": [ + "src" + ], "java.project.outputPath": "bin", "java.project.referencedLibraries": [ "lib/**/*.jar" + ], + "cSpell.words": [ + "rawtypes" ] -} +} \ No newline at end of file diff --git a/实验7/src/task2/WalkCollection.java b/实验7/src/task2/WalkCollection.java index c7dadcd..0edce62 100644 --- a/实验7/src/task2/WalkCollection.java +++ b/实验7/src/task2/WalkCollection.java @@ -16,8 +16,9 @@ public class WalkCollection { while (itr.hasNext()) { System.out.println(itr.next()); } - + // 使用foreach遍历arrayListExample集合 + arrayListExample.forEach(System.out::println); // ---------------------End------------------------ } } \ No newline at end of file