Java/Numeric
From charlesreid1
To check if a String in Java is numeric, build a simple utility function:
public static boolean isNumeric(String str)
{
try
{
double d = Double.parseDouble(str);
}
catch(NumberFormatException nfe)
{
return false;
}
return true;
}