I am working on implementing a simulated annealing program and part of this involves calculating scores from a .txt file that my java program reads.
1) an input string is read from the user. The longer my input string, the more likely the following exception below occurs
2) the score that is calculated is essentially adding a lot of decimal numbers and I store it in a 'double' variable.
Can someone please advise me why such an exception would occur?
Score from Hill Swap: 0.24874990000000005 After swap... Exception in thread "main" java.lang.NumberFormatException: For input string: "7.92066E-" at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1224)
Thanks very much!