Alex Rivera | Logout

Java equivalent of unsigned long long?

Asked 2009-02-03T19:50:26.543
119

In C++, I enjoyed having access to a 64 bit unsigned integer, via unsigned long long int, or via uint64_t. Now, in Java longs are 64 bits, I know. However, they are signed.

Is there an unsigned long (long) available as a Java primitive? How do I use it?

Edit
Report

1 Answer

12

Nope, there is not. You'll have to use the primitive long data type and deal with signedness issues, or use a class such as BigInteger.

answered 2009-02-03T19:53:19.140

Your Answer