Question: The method below is from a doubly linked list implementation of a list ADT. The doubly linked list uses the project #2 DLLNode class for

The method below is from a doubly linked list implementation of a list ADT. The doubly linked list uses the project #2 DLLNode class for node objects. It has both head and tail references. New nodes are added to the end of the list. This method creates and returns a string representing the contents of the list, in the reverse order of insertion. What is the missing statement?

public String gnirtSot() { DLLNode currNode = tail; String listString = ""; while (currNode != null) { listString = listString + " " + currNode.getInfo() + " "; missing statement } return listString; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!