Hands-On Design Patterns with Java
上QQ阅读APP看书,第一时间看更新

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.