// display the data in a circular linked list;
// list references its last node
Node list = null;
if (list != null) {
  // list is not empty
  Node first = list.getNext(); // reference first node

  Node curr = first;        // start at first node
  // Loop invariant: curr references next node to 
  // display
  do {
    // write data portion
    System.out.println(curr.getItem());
    curr = curr.getNext();      // reference next node 
  } while (curr != first);      // list traversed?
}  // end if
