Solved

Unsigned numbers

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

Accepted Solution

by:
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.
0
 
LVL 92

Expert Comment

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

Author Comment

by:s_lavie
ID: 7102758
objects,
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...
0
 
LVL 92

Expert Comment

by:objects
ID: 7102767
Yep, BigInteger sounds suitable for that.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Apps blocked by Java 9 81
How to convert String matching to regex in java 4 34
tomcat startup error 5 65
jsp login check 12 32
For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

809 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