answersLogoWhite

0

Java has a built-in arbitrary-precision integer class called BigInteger. BigInteger can take a number in String format and represent it as a number.

// First huge number (larger than can be held in a Long).

BigInteger bigIntA = new BigInteger("123456789012345678901234567890");

// Second huge number

BigInteger bigIntB = new BigInteger("987654321098765432109876543210");

// bigIntAB = bigIntA * bigIntB

BigInteger bigIntAB = bigIntA.multiple(bigIntB);

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What are object oriented programming language's?

Languages where all types, including primitive types such as integers, are implemented as objects. Java is a pure object oriented language. C++ is not pure because integers, floating point values and pointers are primitive data types that are not implemented as objects. As a result, Java is easier to program, but C++ is more efficient.


How can one assign a list of integers in Java?

Put statements at the start of ones code will allow one to have a list of integers in their Java program. If one does this then they will successfully have integers in their code.


Who developed the JAVA software?

James Gosling was the originator of Oak, the programming language that eventually evolved into Java. He retained a large role in overseeing the design of the Java language itself. The primary developer of the JVM and JDK (and related software) which implemented the Java language was Sun Microsystems, Inc. They were bought out by Oracle, Inc. in 2009.


Why factorial is not a valid identifier in Java?

It's been a little while since I've learned Java, but the exclamation point used to denote factorials (!) is already used in Java to denote a negation (e.g. a != 2 means a is not equal to 2). To create a factorial in Java, construct a for loop and multiply all the consecutive integers.


Is unsigned integer available in java?

No..Java Supports Signed positive and negative integers


What is the difference between coffee and java?

The language was originally called 'Green' but was renamed after Java coffee due to the large amounts of it consumed by the developers.


Is the java is procedural language?

Java is an Object Oriented language not a procedural language


Why does Minecraft need java?

Basically, any program developed with the Java programming language requires Java to be installed on the user's machine. The advantage of doing this is that such a program can run on a large variety of machines.


Does Visual Java plus plus and Java Builder is different from the Java language?

Yes!Visual Java plus plus and Java Builder is different from the Java language?


Why you are preferring java?

java is platform independent language and open source. java is object oriented language.


Why you learn java language?

java language moreover solve the problems witch is encounter in c and c++ that s why we use the java language...


Why java does not support unsigned integers?

Java does not support unsigned integers primarily to maintain simplicity and consistency in its type system. The language designers aimed to provide a clear and straightforward model for numeric types, and including unsigned integers would complicate the arithmetic and bitwise operations. Additionally, Java's focus on portability and cross-platform compatibility means that avoiding unsigned types helps prevent issues related to integer overflow and underflow across different systems. As a result, Java provides a signed integer representation, which is sufficient for most programming needs.