Question: The BigInteger class represents integer numbers with an arbitrary number of digits. (As you will see in Chapter 4, the int type cannot express very

The BigInteger class represents integer numbers with an arbitrary number of digits.

(As you will see in Chapter 4, the int type cannot express very large integers.) You can construct a BigInteger object by providing a string of its digits, such as

BigInteger a new BigInteger ("12345678987654321");

Write a program that prints the square, fourth power, and eighth power of a, using one of the methods of the BigInteger class.

BigInteger a new BigInteger ("12345678987654321");

Step by Step Solution

3.50 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this problem we can write a Java program that utilizes the BigInteger class from the javama... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming Questions!