Unsigned numbers

Posted on 2002-06-23
Last Modified: 2010-03-31
I need to use unsigned int and unsigned long in java!
Question by:s_lavie
  • 2
LVL 86

Accepted Solution

CEHJ earned 50 total points
ID: 7101583
There's only one native unsigned primitive: char. But you can get the functionality you need using BigInteger.
LVL 92

Expert Comment

ID: 7102245
Java does not have an unsigned int and long data type.
Why exactly do you need it?

Author Comment

ID: 7102758
I need to represent (and manipulate) a disk address (8 bytes) which should be an unsigned long.
BigInteger as was suggested by CEHJ, looks like a possible solution - I'm checking it right now...
LVL 92

Expert Comment

ID: 7102767
Yep, BigInteger sounds suitable for that.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 85
splitOdd10 challenge 5 75
for i loop in grovy 1 44
sites similar to codingbat to improve coding hanson skills 3 40
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now