I don't think a circular list would work. Say you have a list with one element and the user asks for the 10th element what element would you return?
How do other containers like ArrayList handle it...
Type: Posts; User: Norm
I don't think a circular list would work. Say you have a list with one element and the user asks for the 10th element what element would you return?
How do other containers like ArrayList handle it...
You want a circular list? The end node points to the first node.
That would keep you from running off the end of the list.
Please copy and paste here the full text of the error message.
What variable is null at the line where the error occurs?
If you can't see it easily, add a println in front of the statement to...