Java Reference
In-Depth Information
21
Custom Generic Data
Structures
Much that I bound,
I could not free;
Much that I freed
returned to me.
—Lee Wilson Dodd
There is always room at the top.
—Daniel Webster
I think that I shall never see
A poem lovely as a tree.
—Joyce Kilmer
Objectives
In this chapter you'll learn:
To form linked data structures
using references, self-
referential classes, recursion
and generics.
■
To create and manipulate
dynamic data structures,
such as linked lists, queues,
stacks and binary trees.
■
Various important
applications of linked data
structures.
■
How to create reusable data
structures with classes,
inheritance and composition.
■
To organize classes in
packages to promote reuse.
■