A basic implementation of linked list in java is:
class Node{
int element;
Node next;
......
}
What I do not understand is how does an object of the class declared within the class itself is able to store the address of another data member. Doesn't declaring Node next enable next itself to have an element part and then again a next. This would happen indefinitely, right? So, how does it work?