CrazyEngineers V4: Early Access

We are developing the next version of CrazyEngineers. If you wish to receive latest updates and early access, click the link below.

1. Home >
2. Apps >
3. Groups >

# Width in bits of double primitive type in Java is

Question asked by rengaraj in #Java on Dec 5, 2009
rengaraj · Dec 5, 2009
Rank C3 - EXPERT
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

R.Rengaraj
{Java Certification Quiz}
{On this forum my 20th Question.} Posted in: #Java
sarveshgupta · Dec 5, 2009
It is 64 bits with a range of -2^63 to 2^63 - 1

that is answer is b. 64

Am I correct?
Mahesh Dahale · Dec 5, 2009
sarveshgupta
It is 64 bits with a range of -2^63 to 2^63 - 1

that is answer is b. 64

Am I correct?
yes you are correct !!!
rengaraj · Dec 5, 2009
Rank C3 - EXPERT
Sir,
R.Rengaraj
Karshil Sheth · Feb 11, 2020
Rank C2 - EXPERT

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

Divisha Madupalli · Feb 12, 2020
Rank C1 - EXPERT

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.

Mohana Chandra · Feb 14, 2020
Rank C1 - EXPERT

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

## You must log-in or sign-up to reply to this post.

Click to Log-In or Sign-Up