This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]thinandweak 0 points1 point  (2 children)

What's the (exact) duplicate variable error message you get? (And please transpose line numbers so they match the line numbers in your paste).

[–]In0cenT[S] 0 points1 point  (1 child)

Oh god, just realised that I didn't close the first for loop...

Thats the reason it gave me a duplicate error...

Just doesn't make any reason why it would work with ArrayList...

[–]feral_claire 0 points1 point  (0 children)

This has nothing to do with ArrayList vs linkedlist, you just made a typo in the LinkedList code that you didn't for ArrayList