Double.MAX_VALUE is the maximum value a double can represent (somewhere around 1.7*10^308).
This should end in some calculation problems, if you try to subtract the maximum possible value of a data type.
Even though when you are dealing with money you should never use floating point values especially while rounding this can cause problems (you will either have to much or less money in your system then).
Related Posts:
- Convert String to double in Java
- Converting double to integer in Java
- Round a double to 2 decimal places [duplicate]
- Round a double to 2 decimal places [duplicate]
- Round a double to 2 decimal places
- How do I limit the number of decimals printed for a double?
- How do I limit the number of decimals printed for a double?
- Double array initialization in Java
- Double decimal formatting in Java
- Double cannot be dereferenced?
- How to implement infinity in Java?
- How can I truncate a double to only two decimal places in Java?
- How can I truncate a double to only two decimal places in Java?
- What do F and D mean at the end of numeric literals?
- Java ArrayList of Doubles
- What is the difference between “Double” and “double” in Java?
- Convert float to double without losing precision
- Convert double to float in Java
- What does Java option -Xmx stand for? [duplicate]
- How to convert nanoseconds to seconds using the TimeUnit enum?
- Using or ‘|’ in regex [duplicate]
- && (AND) and || (OR) in IF statements
- “Javac” doesn’t work correctly on Windows 10
- How to uninstall Eclipse?
- Error parsing data org.json.JSONException: Value
- Converting array to list in Java
- Java – What does “\n” mean?
- What does “|=” mean? (pipe equal operator)
- What is the difference between a static method and a non-static method?
- How to make a deep copy of Java ArrayList
- What does request.getParameter return?
- DB2 jdbc connection error Connection refused. ERRORCODE=-4499, SQLSTATE=08001
- Automated Python to Java translation
- EOFException – how to handle?
- How to fix array index out of bounds error?
- How do I analyze a .mdmp file?
- Initialize List
- > in Java
- “No X11 DISPLAY variable” – what does it mean?
- en_US or en-US, which one should you use?
- Getting Keyboard Input
- catDog string problem at Codingbat.com
- What is the difference between String.subString() and String.subSequence()
- Why Maven project is tied to J2SE-1.5 by default?
- Difference in System. exit(0) , System.exit(-1), System.exit(1 ) in Java
- Exception in thread “main” java.lang.UnsupportedClassVersionError: a (Unsupported major.minor version 51.0)
- How to compare two double values in Java?
- Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 0 error in Java
- How to override compareTo (Java)
- error: unreported exception FileNotFoundException; must be caught or declared to be thrown
- implicit super constructor Person() is undefined. Must explicitly invoke another constructor?
- java.net.SocketTimeoutException: Read timed out under Tomcat
- How to resolve Error listenerStart when deploying web-app in Tomcat 5.5?
- package does not exist error!
- Required: Variable Found: Value
- What does the colon (:) operator do?
- Shifting array to the right – homework
- How to get rid of Checkstyle message ‘File does not end with a newline.’
- Uri not Absolute exception getting while calling Restful Webservice
- Missing method body, or declare abstract in Java
- java code is showing error. ( ‘;’,expected) [closed]
- How can I edit a .jar file?
- java.lang.ClassNotFoundException: sun.jdbc.odbc.JdbcOdbcDriver Exception occurring. Why?
- JAVA_HOME should point to a JDK not a JRE
- This Activity already has an action bar supplied by the window decor?
- Convert hex string to int
- Orphaned Case Error in Java
- Proxy Error 502 : The proxy server received an invalid response from an upstream server
- Warning: The method assertEquals from the type Assert is deprecated
- koch snowflake java recursion
- Java word count program
- How to return a boolean method in java?
- Java read file and store text in an array
- MultipartException: Current request is not a multipart request
- How to extract a substring using regex
- .class vs .java
- Case expressions must be constant expressions for static final int?
- try catch ArrayIndexOutOfBoundsException?
- Response has aready been committed
- How do I test a class that has private methods, fields or inner classes?
- Error: Module not specified (IntelliJ IDEA)
- Checking letter case (Upper/Lower) within a string in Java
- How to swap String characters in Java?
- Exception in thread “main” java.net.ConnectException: Connection refused: connect Socket Programming Java
- Why is there no multiple inheritance in Java, but implementing multiple interfaces is allowed?
- Resource leak: ‘in’ is never closed
- JavaFX and OpenJDK
- What’s the difference between JPA and Hibernate?
- Java console program
- “Source folder is not a Java project” error in eclipse
- How to memory profile in Java?
- java.lang.IllegalThreadStateException
- What is an
method in Java? Can it be overridden? - The sum of all squares between 1 and 100 inclusive?
- How do I initialize a byte array in Java?
- How to map a composite key with JPA and Hibernate?
- Javac “cannot find symbol”
- Difference between volatile and synchronized in Java
- How can I read a text file in Android?
- compilation error: identifier expected
- Setting background images in JFrame