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