Java examples for Language Basics:int
The int data type is a 32-bit signed Java primitive data type.
A variable of the int data type takes 32 bits of memory.
Its valid range is -2,147,483,648 to 2,147,483,647 (-2^31 to 2^31 - 1).
All whole numbers in this range are known as integer literals or integer constants.
For example, 10, -20, 0, 30, 9, etc. are integer literals of int.
An integer literal can be assigned to an int variable
int num = 2;
Integer literals can also be expressed in