Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.math.BigInteger;

public class Main {

    public static void main(String[] args) {

        BigInteger bi1 = new BigInteger("-123");
        BigInteger bi2 = new BigInteger("987654321");

        // assign the long values of bi1, bi2 to l1, l2
        Long l1 = bi1.longValue();
        Long l2 = bi2.longValue();

        System.out.println(l1);
        System.out.println(l2);
    }
}