Class Long
Longs are positive and negative whole 64-bit unsigned numbers without decimals. If you need to work with decimals, use the Float data type. To represent a long number in the code as a literal, suffix it with an "L", for example, "Long l = 576460752303423488L;"
Constructors
Methods
toString()
Converts a numeric value to its string representation.
One of the most frequently used methods, typically when you are going to output something.Declaration
String toString()
Examples
Long c = 576460752303423488L;
String s = c.toString();
Returns
Type | Description |
String |
isNull()
Returns true if it has no value and false if it does.
Declaration
Bool isNull()
Examples
Long i;
printLine(i.isNull().toString());
i = 0;
printLine(i.isNull().toString());
The first output will be true because we haven't initialized i yet.
The next output will be false because i now has the value 0.
Returns
Type | Description |
Bool |
getHighInteger()
Returns the high 32-bit Integer of the Long.
Declaration
Integer getHighInteger()
Examples
Long c = 576460752303423488L;
print(c.getHighInteger().toString());
Returns
Type | Description |
Integer |
getLowInteger()
Returns the low 32-bit Integer of the Long.
Declaration
Integer getLowInteger()
Examples
Long c = 576460752303423488L;
print(c.getLowInteger().toString());
Returns
Type | Description |
Integer |