Chapter 4. Working with Data Structures


4. Working with Data Structures

A data structure is a mechanism for organizing data used by your program. Whenever you are working with groups of similar data items, it's a good idea to make use of a data structure. Java contains excellent built-in support for many different types of data structures, including arrays, lists, maps, and sets. Java bundles most of its classes for working with data structures into what is called the Collections Framework. The Collections Framework is a unified architecture for representing and manipulating collections or data structures. The most commonly used data structure classes are the ArrayList and the HashMap, and those classes are being focused on most in the phrases in this chapter.

The term data structures can apply to the way data is structured in a file or database as well as in-memory. All the phrases in this chapter deal with in-memory data structures.

Note

Sun makes available a document that gives a good overview of the Collections Framework along with some tutorials on how to use the various classes. You can view this document at this link: http://java.sun.com/j2se/1.5.0/docs/guide/collections/index.html





JavaT Phrasebook. Essential Code and Commands
Java Phrasebook
ISBN: 0672329077
EAN: 2147483647
Year: 2004
Pages: 166

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net