23.11.2014 Views

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

Data Structures and Algorithms in Java[1].pdf - Fulvio Frisone

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

advance(): Advance the cursor to the next node <strong>in</strong> the list.<br />

In Code Fragment 3.25, we show a <strong>Java</strong> implementation of a circularly l<strong>in</strong>ked list,<br />

which uses the Node class from Code Fragment 3.12 <strong>and</strong> <strong>in</strong>cludes also a<br />

toStr<strong>in</strong>g method for produc<strong>in</strong>g a str<strong>in</strong>g representation of the list.<br />

Code Fragment 3.25:<br />

with simple nodes.<br />

A circularly l<strong>in</strong>ked list class<br />

181

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!