If for example, I had a linked list of nodes. Each having a field referencing the next node. How much memory does this reference (not the next object) take?
E.g if I have:
Class Node
nextNode node;
public Node(node nextNode){
this.nextNode = nextNode;
}
Does the nextNode field take any memory? If I read correctly, the reference takes 4 bytes, but I'm unsure as I find conflicting information. Thanks!