+ 1
Long in java
If we have a number that makes just from 9(for example 9999)what is the maximum number in long?
6 Answers
+ 6
That's not how limits of data types exist. As you might know that everything is stored as group of binary digits in computer's memory. So larges number that can be stored would be the largest number than can be formed using the available memory space to that data type.
For *long* data type:- it takes 64 bits to represent the number so the largest number that can be represented using all the 63 bits(as one is reserved for -/+ sign) available is 2^63 = 9,223,372,036,854,775,807
+ 2
The range of the long data value is: -2^63 to 2^63 - 1. Therefore the maximum (approx) is, 9.2233E18. The number of digits allowed in the long data type made fully of 9's should be 17 digits long
+ 1
Can you say how you calculate that?
0
I know that but I want to know what's the maximum number full of nines
It is 18 digit or 17 digit?
0
Byte :8bits
Short:16bits
Int:32bits
Long:64bits.
0
Rithea Sreng the answer is
9223372036854775807