Courses‎ > ‎AP Computer Science 2‎ > ‎Konstantinovich‎ > ‎


posted Mar 27, 2017, 10:50 AM by Samuel Konstantinovich   [ updated Mar 27, 2017, 2:41 PM ]

Goal:  My Linked List

Git Directory /09*


Should Include:

                -LNode (inner class)

Methods That should have:

            variables: (start with these and add more as we need them)

            LNode start;

            int size;


        Hint: Start by writing add() to the start of the list, and toString() to see if it is working. Test these methods before writing new ones later!

How to loop through the elements:

Make a temporary reference to the node when you iterate through them (you can call it current)    

    LNode current = start;

In the loop use this piece of code to reference to the next of the temporary LNode or current

    current =; //private access is fine