Java Professional — Easy
Key points
- The `iterator()` method is essential for iterating over collections.
- `hasNext()` and `next()` are methods in the `Iterator` interface, not `Iterable`.
- `forEach()` is a default method in the `Iterable` interface, not a required method.
Ready to go further?
Related questions
