X402: circularList3

Consider the following class definition:
   class Link{
      Object data;
      Link next;
   }
Write a single assigment statement to transform the linked list headed by p into a circular linked list. Your assignment statement must refer to the variable p only. It is given that the list L contains the elements [1,2,3] and p points to 1.

Initial Setup Final Configuration

Your Answer:

Reset
Visualize

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.