How can I change existing string into double. I have code like this declared as string but in reality its getting number from the database.. I was doing sting to number conversi
try { double d = Double.parseDouble(str); Double D = new Double(d); } catch( NumberFormatException e ) { // input cleansing // thou shalt not fail silently }
Reference:
Double.parseDouble