- Hands-On Design Patterns with Java
- Dr. Edward Lavieri
- 39字
- 2021-06-24 14:58:08
Use case
Implementing the iterator design pattern essentially makes use of Java's Iterator interface. We will use a single class example that creates an ArrayList of strings and uses an iterator to iterate through the list, printing each element.