The calculation for the size of a single instance of the VM is as follows:
long and double fields = 8 bytes.
All other field types = 4 bytes.
Instance size = size of all non-static fields (including inherited fields) 8-byte header. No alignment or other implicit costs.
An array has a 12-byte header plus storage for all its elements (rounded up to a multiple of 4 bytes). The size of a single element is:
byte[], boolean[] = 1 byte
short[], char[] = 2 bytes
long[], double[] = 8 bytes
All other arrays = 4 bytes
arrays are also not aligned beyond the 4 bytes that the rounding ensures.