Commit 07f6b02
committed
feat: Use enhanced for-loop to iterate over a List of integers
🧠 Logic:
- Created an `ArrayList<Integer>` and added five integers (1 to 5).
- Used an enhanced for-loop (`for-each`) to iterate through the list.
- Printed each element during iteration, showcasing how lists are traversed in Java using clean syntax.
Signed-off-by: Somesh diwan <[email protected]>1 parent 29d1968 commit 07f6b02
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
0 commit comments