私はこのクラスを持っています:
public class Stack {
private class Node {
String item;
Node next;
}
// some other methods here
}
私の本の中で、著者は、スタック ノードあたりのサイズは 40 バイトであると述べています。
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
最後の 2 つのことは、String と Node への参照のサイズを参照していることを理解しています。object overhead
しかし、 andが何にinner class extra overhead
対応するのかわかりません。説明していただけますか?