Skip to Content
Just Java™ 2
book

Just Java™ 2

by Peter van der Linden
June 2004
Intermediate to advanced content levelIntermediate to advanced
848 pages
21h 28m
English
Pearson
Content preview from Just Java™ 2

List, LinkedList, and ArrayList

One of the concrete classes that implements Collection is java.util.LinkedList. This class is just a plain old “Data Structures 101” forward-and-backward-linked list. You provide separate objects that you want stored, and the library class does the work of setting up and copying references to make a list. You start by instantiating an empty LinkedList, then anything you add is put on the list as a new element.

The class LinkedList implements List which implements Collection. The exact parent-child relationship of interfaces is shown in Figure 16-1.

Figure 16-1. Interface relationship

image

The interface java.util.List ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Just Java™ 2, Fifth Edition

Just Java™ 2, Fifth Edition

Peter van der Linden
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer

Publisher Resources

ISBN: 0131482114Purchase book