import java.math.BigInteger; public class BigIntegers { public static void main(String[] args) { BigInteger a = new BigInteger("12345678901234567890"); BigInteger b = new BigInteger("99999999999999999999"); System.out.println(a); // BigInteger has a toString() System.out.println(b); // that prints it out nicely } }