The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Another Iterateration on Lists

Posted by Matt Gerrans on October 29, 2001 at 3:09 PM

Sheesh, I wrote out a nice little dissertation and then Netscape crashed. Now I'm to demoralized to recompose it. Suffice it to say that Lists are the new improved implementation of Vectors and Stacks and an Iterator (which replaces Enumeration) is a tool for visiting all the items of any Collection (not just Lists). It is worth knowing Iterators because many APIs will return one for use in manipulating a Collection of objects (note that with the Iterator you need to know what kind of Collection it is; it may be a LinkedList, or a HashSet, etc.).

The Book Thinking In Java can be downloaded for free from the author Bruce Eckel's web site. Chapter 9 has a pretty good discussion of Java Collections.

JavaWorld probably has some articles on Collections and Iterators as well.

- mfg




Replies:
  • Thnx! Hiran October 30, 2001 at 11:18 AM (0)

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us