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:

Image To form linked data structures using references, self-referential classes, recursion and generics.

Image To create and manipulate dynamic data structures, such as linked lists, queues, stacks and binary trees.

Various important applications of linked data structures.

How ...

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.