Example Java Program For Creating a Linked Structure


This set of notes shows you how to create a linked structure using Java. It is very similar to how you do it in C++ since the code has a feel that is very similar to pointers. The files to look at are contained in:

  1. List.java: The main file for creating a linked list.

  2. ListNode.java: A class that supports the List class.

  3. test.java: A class that tests the List class. Notice that main does not have to create an instance of test.