Double.parseDouble(String text) will throw a runtime exception if the value entered cannot be parsed into a double (i.e. it contains letters or other invalid characters). So you could add a try...catch around the parse statement and throw up a message if an exception occurs.
No comments:
Post a Comment