Enhanced For-Each Loop in Java

🟢 Beginner Level | Java Core Syntax

📖 Definition

The Enhanced For-Each loop simplifies iteration over arrays and Iterable collections without requiring explicit index tracking.

âš¡ Code Example

String[] names = {"Alice", "Bob", "Charlie"};
for (String name : names) {
    System.out.println("Hello " + name);
}

🧭 Navigation

← 01. For Loop in Java | Module Hub | 03. While Loop in Java →