How much bytes of memory are allocated after the following java statement is executed using a 32 bit JVM (assume that a memory reference contains only the first address of location being referenced)?
int a = new int[20];
How much bytes of memory are allocated after the following java statement is executed using a 32 bit JVM (assume that a memory reference contains only the first address of location being referenced)?
int a = new int[20];
80 bytes for the array itself (4 bytes for an int in a 32-bit system/jvm). Not sure about the variable. But you have numerous problems. One, you're assigning an int array to an int--that won't compile. Two, your question's lone tag is for javascript, which makes me assume that you don't know that javascript and java are different, which makes me wonder why you're concerned with memory allocation at the primitive level at this point in your educational journey.
The int(s) use 4 * 20 bytes. The OpenJDK/Oracle JVM, the header uses 12 bytes, but objects have an 8 byte alignment.
So the total memory used would be 96 bytes.