Dave's Brain

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

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.