CrazyEngineers Archive
Old, but evergreen and popular discussions on CrazyEngineers, presented to you in read-only mode.
@rengaraj • 05 Dec, 2009
Sir / madam,
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,
{Java Certification Quiz}
{On this forum my 20th Question.}
@sarveshgupta • 05 Dec, 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 • 05 Dec, 2009
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 • 05 Dec, 2009 Sir,
Thanks for your reply.
@Karshil Sheth • 11 Feb, 2020

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

@Divisha Madupalli • 12 Feb, 2020

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 • 14 Feb, 2020

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


Related Posts

@jaseemkannur · Jul 6, 2012

Can anyone help me in suggesting and choosing a good SHORT TERM course for B.E ECE graduate?Like networking...or anyother...also i have a doubt whether its necessary to take CISCO ONLINE...

@rahuljain214 · Oct 15, 2009

I am simulating 2D orthogonal turning process in ABAQUS 6.7-4. Its coupled thermal displacement problem which I am doing in ABAQUS Explicit. for this I have created three different part...

@Ankita Katdare · Jun 9, 2014

In the Cognitive Anteater Robotics Laboratory (CARL) at the University of California, Irvine, a team of researchers led by Jeff Krichmar, professor of cognitive science, is developing what are being...

@adlin · Apr 25, 2010

hey guys.. can anyone tell me which companies are better than accenture? and which companies are worser than accenture?

@Akhil Vijay · Sep 9, 2015

Can anyone please let me know the difference between stdio.h & conio.h and where & when these header files should be used?