📅  最后修改于: 2022-03-11 14:52:22.659000             🧑  作者: Mango
// BigInteger can be bigger than Long. If so, then the ".longValue()" will return an exception.
public static void main(String[] args) { // Program start method.
BigInteger bigInteger = new BigInteger(Long.MAX_VALUE + ""); // Create the BigInteger.
System.out.println("LongValue: " + bigInteger.longValue()); // Get the value in Long form.
}