list and first won't reference the same object unless you set it to.
Type: Posts; User: javapenguin
list and first won't reference the same object unless you set it to.
they are. However, list and first are references to a linked list. The linked list that list is referring to is not the same, unless you specifically set it using clone() or something, the same as...
Because you just created a new linked list with nothing in it.
Unless your LinkedList class starts with 29 elements, it will have none to start with, and it looks like your declaration is the last...