KnowledgeBoat Logo
|

Computer Applications

double x[] = {2.5, 4.5, 5.5, 6.4}; occupies …………… bytes.

  1. 16
  2. 4
  3. 8
  4. 32

Values & Data Types Java

10 Likes

Answer

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.

Answered By

7 Likes


Related Questions