answersLogoWhite

0


Best Answer

In reality, it's not. 2,147,483,647 is the largest number that an int type can hold. This is because Java uses a 32-bit signed integer value for ints. Since it's signed, one bit needs to hold the sign value, leaving us 31 bits for storage. 231 = 2,147,483,648, which is the total number of values which can be held in 31 bits. Since we also need to store a zero, our maximum is 2,147,483,647. The total range of data which can be held in an int is [-2,147,483,648 : 2,147,483,647].

But, as was said above, this is not the biggest number Java can handle. It also has support for 64-bit long integer types. This type can hold values in the range [-9,223,372,036,854,775,808 : 9,223,372,036,854,775,807].

And finally we have the BigInteger class, which can hold infinitely large numbers, limited only by the physical capacity of your storage space (RAM).

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Why is 2147483647 the biggest number Java can handle?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is it possible to run java program without JVM?

No. Java programs run in the Java Virtual Machine (JVM) - without it your computer won't know how to handle Java bytecode.


Change int to string in java?

String.valueOf(number);


Can you get a Java program to find the cube of a number?

Yes


What is number format exception in java?

That may happen when Java tries to parse a String, to convert it into a number. In this case, if the String doesn't contain a valid number - or perhaps if it contains additional symbols not appropriate for a number - you may get this error.


Where can one update their Java player online?

Someone can update their java player online from a number of websites such as the official java website. To update java player, someone needs to visit the java website and select update from the home page. There will be a prompt to download and install the latest version of java. After that is done, the player will be updated.

Related questions

What is the biggest island population wise?

Indonesia Java Island


Is it possible to run java program without JVM?

No. Java programs run in the Java Virtual Machine (JVM) - without it your computer won't know how to handle Java bytecode.


How exception subclass is created in java?

To handle the exceptions in large programs


What does it mean if you have java and you can't play minecraft?

You may need to download the newest version of Java for minecraft to work. Or maybe your computer can not handle it.


What are real constants in java?

"real" numbers, in any programming language, are actually approximations of what is called a "real number" in math. Basically, a number that can handle decimals - but unlike the actual real numbers, of limited precision. In Java, the "real" data types are float, and double. double has greater precision. A "constant" in Java is similar to a variable, but its value can't be changed after it has been assigned a value.


What are the 5 biggest islands in Indonesia?

Papua, Kalimantan, Sumatra, Java, and Sulawesi.


You want to design website and handle it.whether you should learn core java or advanced java?

You should learn HTML, JavaScript and other web programming languages. Leave learning Java until you have a good reason to learn it.


Where were the allies biggest defeats buring 1942?

The Battle of the Java Sea; the Battle of Savo Island.


How do you find a system number in a JAVA program?

If by system number you mean the version number of the Java language on the client computer, you can useSystem.getProperty("java.version"); .Or, if you want the Java virtual machine version number you can use System.getProperty("java.vm.version"); .Finally, if you want the version number of the operating system, you can use System.getProperty("os.version"); .


How do you find out whether Java is installed on Linux?

Enter "java -version" into a terminal. If Java is installed, it will tell you the version number. If it is not installed, it will say "command not found."


Where can one find a Java development kit?

Java Development Kits are best found on the Java website. There are a number of programmes that can be downloaded. It is also possible to get Java Development Kit downloads from the Oracle website.


What is the use of thread in java?

Thread is a single sequential flow of control within program. Each flow of control may be thought of as a seperate lines of code(module) is called as thread.Actually thread is a predefined class in java. threads are used to handle Exceptions in java.