java - sort doubles stored as strings ? -
Hello, is there a way to parse string in numbers? And is there any way to check whether a program is a string or not without breaking the program? I'm thinking about trying and catching it would be a good idea?
string to check if a string is parsable without trying to parse the string To start trying to interpret as a number ...) For checking halfway, I think you can use Regex to check that there are only digits and periods of the string. You must use an attempt ... Hold the block though. although,.
How to parse a string in double, try it:
double DD; Try {dd = double. Prsd double (string); } Hold (NumberFormatException e) {System.out.println ("Could not parse the string!"); }
Comments
Post a Comment