📌  相关文章
📜  java.math.biginteger 不能转换为 java.lang.long - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:22.659000             🧑  作者: Mango

代码示例1
// 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.
    }