1. Java library to check whether a String contains a number *without* exceptions stackoverflow.com
I'm looking for a method that returns a boolean if the String it is passed is a valid number (e.g. "123.55e-9", "-333,556"). I don't want to just do:
2. Exception in java.math.BigDecimal coderanch.com
You can check the source code of BigDecimal by unpacking the src.zip file in your JDK folder. Anyway, I checked for you, and line 647 is this: this(val.toCharArray(), 0, val.length());So that means that for the exception to come from this line you have somewhere a call to new BigDecimal with a null string. Since re isn't null and you say rev1 ...