my question is perhaps too simple: maybe that's the reason i didn't manage to find a written answer. i am trying to understand the way linked lists are built, and there is one thing i can't understand: usually, when i create an object of some kind of class, i need to give it a name, like that:
cat kitten =new cat();
at the same time when i do that, the computer gives it an address, something like dfe@fggv3444. when i want to use the created object in some method, i address it by the name i gave it: in our case :"cat". the logic is that if i name 2 objects in the same name "cat", the computer wouldn't know which object to access- or perhaps, both. and now the question: when we use a linked list, the number of used nodes changes a lot throughout the program. so how this objects of node class type are getting their names? obviously they must have a name, but i am not there to give each node its name...
how it works?!
thanks in advance. i am sure that something in this question must be silly, but can't figure out what.