Range of ints

Edit on Github instead

Java can't store every whole number; it can only store ints that fall within a certain range: -2,147,483,648 to 2,147,483,647.

Rather than memorize those numbers, Java proides two constants, Integer.MAX_VALUE and Integer.MIN_VALUE, you can use:

Integer.MIN_VALUE-2147483648
Integer.MAX_VALUE2147483647

Suggest changes

Related links

URL Topic Source