Browse - Programming Tips - What the maximum that a short, int, long can store?

Date: 2010aug11
Language: Java

Q.  What the maximum that a short, int, long can store?

A.

short -2^15 -1 to 2^15 -1 ~ 32K int -2^31 -1 to 2^31 -1 ~ 2 billion long -2^63 -1 to 2^63 -1 = 9,223,372,036,854,775,807