Integer Datatype

There are 2 datatypes that we can use to store values.

  1. Integer (4 bytes) →  Range(-2147483647 to +2147483647)
  2. Long (8 bytes) → Range (-263 to +263-1)

Note: If the literal goes out of integer range then append l or L at the end of the literal because by-default a number is treated as integer. Eg. long L = 3434343434L;

Note: If the value is not in the range of type defined then the compiles time error is generated.

Our Recent Blog

Share This Post