Type | long | |
Dimension | 64 bit (8 byte) | |
Domain | the set of integer numbers in the interval [- 263, +263 - 1] | |
Operations | + | sum |
- | difference | |
* | product | |
/ | integer division | |
% | rest of the integer division | |
Literals | sequences of digits ending with an l (or L) | |
denoting values of the domain (e.g., 9000000000L) |
Example:
long a, b, c; // Declaration of variables of type long a = 9000000000L; // Use of literals b = Long.parseLong("9000000000l"); // Conversion from String to long c = b / 300000L