Say I have very big numbers. I know in C we could declare:
long long int // What is equivalent of this in Java?
long double // and this?
Thanks.
Say I have very big numbers. I know in C we could declare:
long long int // What is equivalent of this in Java?
long double // and this?
Thanks.
Even in C, a long double and long long int use varying representations on different hardware and compilers. Many compilers consider long double to be the same as doubleβor might give an error.
Similarly, long long has limited support on 16- and 32-bit compilers and especially such platforms.
From here we can see that in Java,
a 64 bit = long, 32 bit = int.
Therefore, your long long int in C in a 64 bit linux environment produces a 64 bit int which is equivalent to long in Java. In Windows, 64 bits is _int64.
however, long double is a newer feature and extends the usual length of double and has no primitive equivalent in Java
There is no native equivalent in java. You should check out the BigInteger class.