Hi,

I was trying to pass a string into a double myself, but I get thrown a Numberformat exception.
Here's what I am trying to do:

String s = Litres of water collected are 12.5

I want to parse only the numeric value "12.5" into a double. I tried Double.valueOf(s); as well as Double.parseDouble(s); But they don't seem to work. Any suggestions?