Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 21. Classes: A Deeper Look, Part... > Section 21.9 Container Classes and I...

Section 21.9 Container Classes and Iterators

  • Items are returned from a queue in first-in, first-out (FIFO) order—the first item inserted in the queue is the first item removed from the queue.

  • Container classes (also called collection classes) are designed to hold collections of objects. Container classes commonly provide services such as insertion, deletion, searching, sorting, and testing an item to determine whether it is a member of the collection.

  • It is common to associate iterators with container classes. An iterator is an object that “walks through” a collection, returning the next item (or performing some action on the next item).


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint