Hi Cindy,
Java 2 has a static method of the Double class called parseDouble that takes a
String argument and returns a double.
If the String argument cannot be converted into a double, it throws a NumberFormatException.
If you put the Double.parseDouble("5.6") in a try block then an Exception will be thrown to your catch block. If the parse was successful, no exception will be thrown.
Let me know if that was too complicated or if you have found an easier way to do it (That would be great).
Hope that helps.
Paul