java.lang · java.base · since Java 1.0
Long
public final class Long extends Number
implements Comparable<Long>, ConstableImmutable box for long with parsing and comparison utilities. Same caching (−128…127) and same boxing pitfalls as Integer, at 64 bits.
Key methods
static long parseLong(String s) | String → long. |
static Long valueOf(long l) | Boxing entry, small-value cache. |
static int compare(long a, long b) | Safe comparison. |
static long parseUnsignedLong / divideUnsigned | Unsigned interpretations of the same 64 bits. |