A variable declared as double d = 10.3; occupies ________ bytes of memory.

  • 16
  • 2
  • 4
  • 8
In Java, a variable of type "double" occupies 8 bytes of memory. The "double" data type is a 64-bit floating-point type that can hold both integer and fractional values. It requires 8 bytes to store its precision and range, making it suitable for storing large and decimal numbers with high precision.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *