0 votes
in JAVA by
What is the size of the below array in memory?

1 Answer

0 votes
by

What is the size of the below array in memory?

int a[]=new int[10];

Each int block takes a size of 4 bytes and there are 10 such blocks in the array. Hence, the size the array takes in memory is 40 bytes.

Related questions

0 votes
asked Dec 16, 2020 in JAVA by SakshiSharma
+1 vote
asked Feb 14, 2020 in JAVA by rahuljain1
...