This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Signed and Unsigned int Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Signed and Unsigned int" Watch "Signed and Unsigned int" New topic
Author

Signed and Unsigned int

ragi singh
Ranch Hand

Joined: Mar 10, 2010
Posts: 198

can anyone explain the difference between Signed int and Unsigned int ?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43995
    
  33
A signed int has both negative and positive values. An unsigned int is never ised in Java™. Other languages might used unsigned integers; for example C# has a type called uint, which is unsigned. It runs from 0 to 4294967295 inclusive, whereas the int type has the same range of values in C# and Java™: -2187483648 to 2147483647.

The only unsigned number used in Java™ is the char.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Signed and Unsigned int
 
It's not a secret anymore!