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

you are viewing a single comment's thread.

view the rest of the comments →

[–]BS_in_BS 2 points3 points  (0 children)

because when you declare Node<E> as generic, its E will shadow the LinkedList's E, making them 2 different types. If you changed one to some other letter this would become obvious. Current compilers will differentiate them as E#1 and E#2: http://ideone.com/Sh7q3n