Integer types

Java defines four integer types: byte, short, int, and long.

Integer types are signed, positive and negative values.

The width and ranges of these integer types vary widely, as shown in this table:

Integer Types

NameWidthRange
long64-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
int32-2,147,483,648 to 2,147,483,647
short16-32,768 to 32,767
byte8-128 to 127
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.