I have this class :
public class Stack {
private class Node {
String item;
Node next;
}
// some other methods here
}
In my book, the author says that the size per stack Node is 40 bytes including:
16 bytes (object overhead)
8 bytes (inner class extra overhead)
8 bytes (references to string)
8 bytes (references to node)
----------------------------------------------
40 bytes per stack node
I understand that the last two things refer to the size of the references to the String and Node. But I don't know what the object overhead
and inner class extra overhead
correspond to. Can you please explain?