1(iii)
double x[] = {2.5, 4.5, 5.5, 6.4}; occupies ............... bytes.
- (a)16
- (b)4
- (c)8
- (d)32
Show SolutionHide Solution↓
32
Reason — The double data type in Java occupies 8 bytes of memory. In the array double x[] = {2.5, 4.5, 5.5, 6.4};, there are 4 elements, and each element takes 8 bytes. So, the total memory occupied is 4 × 8 = 32 bytes.