[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

JAVA Programming :: Basic Concepts - Discussion

Home > JAVA Programming > Basic Concepts > MCQs Questions Discussion

52 / 64

Choose the correct option.

What is the number of bytes used by Java primitive long. Select the one correct answer.

AThe number of bytes is compiler dependent.

B2

C4

D8

E64

Answer: Option (Login/Signup)

Show Explanation

Number of bytes used by primitive long is 8 bytes. For other data types in java, it is listed below-

TypeSize in BytesRange
byte1 byte-128 to 127
short2 bytes-32,768 to 32,767
int4 bytes-2,147,483,648 to 2,147,483, 647
long8 bytes-9,223,372,036,854,775,808 to 
9,223,372,036,854,775,807
float4 bytesapproximately ±3.40282347E+38F 
(6-7 significant decimal digits) 
Java implements IEEE 754 standard
double8 bytesapproximately ±1.79769313486231570E+308
(15 significant decimal digits)
char2 byte0 to 65,536 (unsigned)
booleannot precisely defined*true or false

Asked In ::

Post Your Answer Here:     

Reply    
Rate This: +0 -0
    Report


Report Error

Please Login First Click Here