We are developing the next version of CrazyEngineers. If you wish to receive latest updates and early access, click the link below.
Width in bits of double primitive type in Java is

My question is
The width in bits of double primitive type in Java is --. Select the one correct answer.
a. The width of double is platform dependent
b. 64
c. 128
d. 8
Advance Thanks,
R.Rengaraj
{Java Certification Quiz}
{On this forum my 20th Question.} Posted in: #Java

that is answer is b. 64
Am I correct?

yes you are correct !!!sarveshguptaIt is 64 bits with a range of -2^63 to 2^63 - 1
that is answer is b. 64
Am I correct?

Thanks for your reply.
R.Rengaraj

Its 8 bytes. [ 64 bits] As double is used to store floating point values and is used in static and constant methods.

The answer is 8 bytes in a 64-bit system. Double in Java is used for representing the decimal numbers. For double type there are or you can have at least 15-16 bits. The default value for decimals in Java is double if you don't give the specific units. Double uses 1 bit for sign, 11 bits for exponent and 52 bits for the mantissa. A value having a range within 1.2E-38 to 3.4E+38 can be assigned to float variables.

In java,double uses 8 bytes of memory ,which is equal to 64 bits , since 1byte=8 bits.