Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linked Lists in Java - THANKS!! 1

Status
Not open for further replies.

compaq2004

Programmer
Nov 19, 2003
1
GB
Hi,

Can anyone tell me what is the actual difference between using a Linked List and a Linked List with Cursor? I don't need to know the programming implentation details just the essential differences between both types if Linked List.

Thanks very much.

Keith
 
A linked list with cursor is an active data structure. This means that it mangages an internal state (cursor position) which tells where access, inserts, removes, etc. take place in the list. It provides also a proper mean to traverse itself : go to a specific item, move to next item, move to start, etc. All these features move the cursor position.

At the opposite, a traditional linked list is a passive data structure. It can only be traversed by iterators, or loops like :
(for int i = 0; i < list.count (); i++)
//do stuff with list.item (i);
It holds no particular state.

--
Globos
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top